NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Set sequence parameter of type Object Reference from LV



I have a number of sub-sequences which have a parameter of type object reference. I use this to pass in a LabVIEW object from a calling sequence. The LabVIEW object is passed out of a VI via the connector pane.


I would like to programmatically set the sequence parameter from LabVIEW but have been unable to determine how to do this. Whilst I can see how to set parameters which are of type string etc, i.e. by the SetValString method of the PropertyObject class, it isn't apparent to me how I can do this for parameters of type object reference.


Does anyone have any suggestions?



0 Kudos
Message 1 of 5

Try SetValIDispatch or SetValInterface.


I can't ever tell the difference between the two but one of them should work.

~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5

Neither of those work for me sadly, they both just silently fail to set the parameter.



In the example below, the first property node fails to set the object reference in the sequence parameters but doesn't error so the following string is set correctly.


0 Kudos
Message 3 of 5

To be able to update these properties from within  LabVIEW we need to pass a sequence context reference to the code module.From TestStand we need to pass the sequence context (this context).



We can then use this in LabVIEW to access the associated properties like below:



The above VIs functionality is equivalent to the TestStand experesion:


ThisContext.Sequence.Main["Action"].Name = "newStepName


Hopefully this helps, do let me know if you have any more questions.





Aaron. E
Product Performance Engineer
0 Kudos
Message 4 of 5

Nopie, unfortunately the images seem to be broken.


I have the same problem, this help could have been helpful for me too. 

0 Kudos
Message 5 of 5