NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

sequence file limit export question

I have a question on Teststand "Tools->Import and Export properties...". A sequence file have been built, see attached template.seq, what I would like to see is how to export it to be like that attached template.xls, which include Lmit.high, Limit.low, TS.Mode, sequence name, and so on.I tried it many time but failed to do that
Thanks!
Jacky
Download All
0 Kudos
Message 1 of 4
(3,693 Views)
Howdy Jackie -

The Import and Export Properties tool is not meant for a large amount of format customization.  That is, it expects a certain format for its tags and information, and creating a file outside of that format will result in values not being loaded.  If formatting is extremely important for your application, you may be better off creating you own customized property loader steps.  To do this, you can simply pass the sequence context to a code module in whatever language you are developing with.  You can use that languages File I/O functionality to bring in the data you are attempting to import.  You can then use lookup string and the "SetVal" methods of the propertyobject class to set any property you want.

That being said, I have included an example XLS file that shows close to the functionality you are looking for.  I have also included two screenshots so that you can see my exact settings for this export.

For TS.Mode (or any "hidden" property), you will not be able to find it in the property tree.  So, to populate this, you will need to first add a dummy property (for example, Step.Result.Common).  Then, erase the string in the "Property Name" field, and replace is with TS.Mode.  I've shown the end result in the second screenshot.

Let me know if you need any more information on the issue.  Thanks and have a great day!

Regards,
Andrew W || Applications Engineer
National Instruments
Download All
0 Kudos
Message 2 of 4
(3,674 Views)
To make use of NI import/export functions, which built-in API functions can I use in order to develop a limit export application, which has the ability to export limits from a sequence file?


Thanks!
Jacky
0 Kudos
Message 3 of 4
(3,650 Views)
Howdy Jacky -

The TestStand Import/Export tool and property loader step simply call a series of setVal (or getVal) methods for all of the different property objects you attempt to export/import.  Thus, you coud do something similar in your own tool.  Note that this tool can be written in LabVIEW, CVI, C#.NET, VB.NET, etc.  You really have your own choice here.  To be a little bit more specfic, you could take the steps listed below.  For help with the specific methods, please consult the TestStand Help for extra information.

- You can send the sequence context to your tool, or open the sequence from file.  To get the sequence from a sequence file on disk:
    - Create a new engine object
    - Call Engine.GetSequenceFileEx to get the sequence file object you would like to use.
    - Call SequenceFile.GetSequenceEx to get the sequence object.
- From GetSequenceEx, the sequence object has Sequence.GetNumSteps method.  You can use this method to return the number of steps, and create a foreach loop based on this number.
- For each step, use the PropertyObject.Exists method to determine the property you are trying to set exists for that step, and then use one of the SetVal methods to insert the property (or GetVal methods for exporting properties to file).  Repeat the methods for every property you would like to import/export.
- Note that the above directions only reference the TestStand API calls needed.  You can use the File I/O capabilities of whatever language you are using to handle inserting and removing the properties from file.

Let me know if you still need help with the above suggestions.  Thanks and have a great day!

Regards,
Andrew W || Applications Engineer
NI
0 Kudos
Message 4 of 4
(3,614 Views)