Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Dear devs,
I am struggling finding the way to access a Network using the Java Eclipse SDK: I have a service with a Thing, which is correctly assigned by the context, and I can access the list of the Networks in which the Thing belongs using:
thingNetworks = apiWrapper.GetNetworks();
Which returns an InfoTable with name and description of the network. I don't understand how can I use it to access the corresponding Network in the SDK, since based on the docs it only has an empty constructor associated to it.
Thanks and best regards!
Solved! Go to Solution.
I answered myself, there is a generic utility to find all entities by name:
thingsNetwork = (Network) EntityUtilities.findEntityDirect(thingNetworks.getRow(0).getStringValue("name"), ThingworxRelationshipTypes.Network);
I answered myself, there is a generic utility to find all entities by name:
thingsNetwork = (Network) EntityUtilities.findEntityDirect(thingNetworks.getRow(0).getStringValue("name"), ThingworxRelationshipTypes.Network);