04-24-2012 04:30 AM
Hello
Is it possible to use the lookup strings to access the inputs of the LabVIEW module? I know i can use them to access the step properties but I'm not sure if I can use them also for the VIs inputs?
In the other way I have to use reference to the LabVIEW module and then enumerate all inputs according to it's type to get through it's value. But this might be slower in comparison to lookup string.
Thanks for support
Best Regards
Maciej
05-16-2012 01:43 AM
Dear Maciej,
Yes, you can access the LabVIEW module with lookup strings, and also to it's parameters.
Here is an example:
RunState.Sequence.Main["Action"].Module.AsLabVIEWModule.Parameters.Item(0)
This access the first (0 index) LabVIEW module parameter in the Action step of the Main stepgroup in the current sequence.
You can read about the LabVIEWParameter type in the Reference Manual:
http://zone.ni.com/reference/en-XX/help/370052J-01/tsapiref/reftopics/labviewparameter/
If you want to configure the inputs and outputs in a dialog box, you could call the API method:
RunState.Sequence.Main["Action"].Module.Specify()
You can browse the API Reference manual for further details and to find the mehtods and properties you might need 😉
F1 in TestStand or use the online manual: http://zone.ni.com/reference/en-XX/help/370052J-01/tsapiref/reftopics/tsadpapiobjects/
Best Regards,
Tamas Szekely
Applications Engineer
05-16-2012 09:23 AM
Tamas' example isn't really using lookup strings, it's using the API. Using the API like this is the recommended way of accessing the module and parameter settings. It is also possible to access them using the propertyobject API and lookupstrings, but that is not recommended since it's possible for the underlying propertyobject structure to change in a future version, while the TestStand API, on the contrary, will remain backwards compatible in most cases.
Hope this helps,
-Doug