12-10-2012 10:25 AM
Hi.
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?
Thanks
12-10-2012 10:50 AM
Try SetValIDispatch or SetValInterface.
I can't ever tell the difference between the two but one of them should work.
12-10-2012 02:00 PM
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.
12-12-2012 06:56 AM - edited 12-12-2012 06:56 AM
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.
Thanks,
Aaron
06-16-2016 12:26 PM
Nopie, unfortunately the images seem to be broken.
I have the same problem, this help could have been helpful for me too.