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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Is there a way to call base.setPropertyVTQ as described in document CS206137 within a foreach loop?

pwallace-2
1-Visitor

Is there a way to call base.setPropertyVTQ as described in document CS206137 within a foreach loop?

For example, can you do something like this?

foreach(PropertyDefinition props in myVirtualThingClass) {

     VTQ vtq = new VTQ();

     vtq.setValue(new NumberPrimitive(random.Next(1000)));

     vtq.setTime(new DateTime());

     vtq.setQuality(QualityStatus.GOOD);

     base.setPropertyVTQ(props,vtq, true);

}

Also, do you need to intantiate a VTQ object everytime you want to call setPropertyVTQ to update your properties in ThingWorx?

The SteamSensor example makes sense, but we have several properties that and are not sure if we can simplify the calls to setPropertyVTQ for each of our properties.

Thanks

Paul

0 REPLIES 0
Announcements


Top Tags