03-02-2005 03:55 PM
03-03-2005 01:25 AM
10-31-2008 06:09 AM
I am trying to create new FileGlobals properties and then save it to sequence file. The only option I found is the one you propose here, but the main problem is that they are created in execution and they only exist in execution.
Currently, I'm evaluating 2 options:
- From an external application using TestStand 3.5 API, edit a sequence file in order to create new FileGlobals, if they don’t exits, and then save the sequence file.
- Create a TestStand step to create new fileglobals in execution but keeping them after sequence execution end.
Is it possible? Because I was not able to find such a solution in TestStand help/examples.
Thanks!
12-03-2008 01:50 PM
Hello essancla,
We have an article that explains how to programmatically create File Globals.
How Can I Programmatically Create Sequence File Globals?
http://digital.ni.com/public.nsf/allkb/4D14755C3FBCEAD486256D10007359E2?OpenDocument
The only thing you will want to do differently is in step two of that article. For the setVal function you use one of the parameters is Option and you will want to pass in: 1 OR 4
If you look in the help for PropertyOptions:
http://zone.ni.com/reference/en-XX/help/370052G-01/tsapiref/reftopics/propertyoptions/
You'll see that 1 refers to "PropOption_InsertIfMissing" and 4 refers to "PropOption_DoNothingIfExists". By using those options you won't have to first check if the File Global does not already exist and it will not override File Globals that already exist.