NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning LabVIEW class object to RunState.Engine.TemporaryGlobals

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

0 Kudos
Message 1 of 2
(1,612 Views)

Looks  like the EvaluateEx function might help in returning a ref to the object specified by string.

Need to explore.

 

Thanks

0 Kudos
Message 2 of 2
(1,559 Views)