NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

question about dynamic variables creation

I am using TestStand 3.1. I am trying to use the TestStand API from within TestStand to dynamically create variables in TestStand. With the method I am using, I am able to create StationGlobals variables but not locals or fileglobals. I called NI TestStand API 3.1 automation server and PropertyObject class. I used ThisContext as the object reference. Then I called the NewSubProperty method.
 
I am attaching a sequence file to illustrate my problem. Any help will be greatly appreciated.
 
Thanks
 
Anuj
0 Kudos
Message 1 of 3
(2,966 Views)
Hi
 
For creation of Sequence Locals you could get a handle to the locals using Sequence.Locals then create the new variable using PropertyObject.SetValBoolean (for boolean creation) with the insert if missing option set.
 
For creation of Sequence Globals you could get a handle to the globals using SequenceFile.FileGlobalsDefaultValues then create the new variable in the same way as above.
 
For both methods you will need to specify both name and value for your variables.
 
Just created a sequence that programatically generates a Local Boolean and Global Numeric, see attached.
 
Hope this helps
 
Steve

Message Edited by SercoSteve on 03-14-2006 09:16 AM

There are 10 types of people in the world that understand binary, those that do and those that don't.
Message 2 of 3
(2,964 Views)

Hi

 

I inserted in this conversion because I also have a problem when I want to create a local variable with Teststand 2010.

To create programmatically a new local variable, I use the NI teststand API ( PropertyObject.NewSubProperty) The problem is the local variable is available during runtime but I don't see the variable in the local variable pane after the end of the runtime.

What is the best method to solve the problem?

 

Thanks,

 

Xavier

0 Kudos
Message 3 of 3
(2,448 Views)