0 Replies Latest reply on Jan 13, 2016 11:28 AM by pwallace RSS
    pwallace Newbie

    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