cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Access a Network from the Java Eclipse SDK

Raccone
12-Amethyst

Access a Network from the Java Eclipse SDK

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!

ACCEPTED SOLUTION

Accepted Solutions
Raccone
12-Amethyst
(To:Raccone)

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);

 

View solution in original post

1 REPLY 1
Raccone
12-Amethyst
(To:Raccone)

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);

 

Announcements


Top Tags