03-14-2020 02:38 PM
Hello,
I am trying to do the following (LabVIEW2019, TestStand2019, Windows 10)
Create a new sub-property under RunState.Engine.TemporaryGlobals as Measurements.TestName_DateTimeStamp
My TestStand expression:
Locals.tmp_prop_object = RunState.Engine.TemporaryGlobals,
Locals.tmp_prop_object.AsPropertyObject.NewSubProperty(Locals.name1, PropValType_Reference, False, "",0),
where Locals.name1 is Measurements.TestName_DateTimeStamp
(e.g: RunState.Engine.TemporaryGlobals.Measurements.RxGain12_16_58AM)
I now want to assign a LabVIEW class object to this property as:
RunState.Engine.TemporaryGlobals.Measurements.RxGain12_16_58AM = Locals.tmp_obj_ref
where Locals.tmp_obj_ref is the output terminal of a LabVIEW class and tmp_obj_ref is a TestStand variable of type Object Reference
If I do it like above in the expression window, I can see that my RunState.Engine.TemporaryGlobals.RxGain12_16_58AM has been assigned a LabVIEW class object
However, the value RxGain12_16_58AM is known to me only at run-time, so I cannot hard-code the assignment expression as above.
Any pointers on how to achieve this?
Basically if,
Locals.name = "RxGain12_16_58AM" (created at run-time)
then i want to be able to assign, during run-time:
RunState.Engine.TemporaryGlobals.RxGain12_16_58AM = Locals.tmp_obj_ref
03-16-2020 02:21 AM
Looks like the EvaluateEx function might help in returning a ref to the object specified by string.
Need to explore.
Thanks