NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing locals or parameters to perl scripts

I have a wrapper with which I can pass perl scripts into teststand sequences. Now what I need to do is use teststand locals or teststand parameters as variables inside the perl script. I did quite some research on the perl command like arguments and teststand features but have not found anything useful. Please let me know if you know how this can be done.

Thanks
0 Kudos
Message 1 of 2
(2,896 Views)
I'm not a PERL expert, but I don't think there is anything in PERL that allows you to access ActiveX objects. Since you are writing a warpper that calls your PERL script (in some language that can access ActiveX objects), you could evaluate parameters (TestStand variables, etc...) in your wrapper, and pass it in the command line to PERL. For example, you could make a custom step type that had one parameter that was an expression for the arguments (perhaps using an expression edit control). You could store this property in a step property that is of type "expression". In your wrapper, you can call PropertyObject.EvaluateEx on your sequence context with the value of the expression as its parameter. Then you can pass this into the command line argument when calling your PERL script.

Allen P.
NI
0 Kudos
Message 2 of 2
(2,890 Views)