Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
I have created a network hierarchy in composer now I want to check who is parent or who is its children so for that what I have to do please explain like do I have to write the services?
Thanks,
Lav
Solved! Go to Solution.
Hi @Rayon_11
To get all hierarchy in Network you can use the ''GetNetworkConnections" service
// result: INFOTABLE dataShape: "NetworkConnection";
let result = Networks["NetworkName"].GetNetworkConnections({
maxDepth: 20 /* NUMBER */
});
The output will look like this :
To find the parent of the child, you can filter the above result based on the 'to' column (Child) and its "from" column will be the parent of it
To get a child list based on parent, you can use the "GetChildConnections" service
// result: INFOTABLE dataShape: "NetworkConnection"
let result = Networks["NETWORKNAME"].GetChildConnections({
name: "PARENTNAME" /* STRING */
});
/VR
Hi @Rayon_11
To get all hierarchy in Network you can use the ''GetNetworkConnections" service
// result: INFOTABLE dataShape: "NetworkConnection";
let result = Networks["NetworkName"].GetNetworkConnections({
maxDepth: 20 /* NUMBER */
});
The output will look like this :
To find the parent of the child, you can filter the above result based on the 'to' column (Child) and its "from" column will be the parent of it
To get a child list based on parent, you can use the "GetChildConnections" service
// result: INFOTABLE dataShape: "NetworkConnection"
let result = Networks["NETWORKNAME"].GetChildConnections({
name: "PARENTNAME" /* STRING */
});
/VR