05-11-2019 06:33 PM
In Foo.seq there are n subsequences. How can I check if the file contains subsequence called "Bar"?
Note that Foo.seq will be loaded dynamically during execution.
Solved! Go to Solution.
05-13-2019 04:09 AM
There is a method called SequenceNameExists() that you can use.
you need to get a reference to the sequencefile. If it is not loaded use Engine.GetSequenceFileEx() to load it. Then use the returned reference to check if the sequence exists. Check out the Sequencefile methods.
dont forget to release the sequencefile when you are done.
05-13-2019 08:13 AM
Thanks. It seems to me that RunState.Engine.GetSequenceFile("foo.seq").SequenceNameExists("Bar")) is better since it does the load and unload automatically.
"You can use the SequenceAdapter.GetSequenceFile method to examine the contents of a sequence file without running load and unload callbacks, without preloading modules, and without merging types."
One more question as I'm new to the TestStand API. Lets say that I run Locals.ref = RunState.Engine.GetSequenceFileEx("foo.seq"). How can I then call the refs methods?
Locals.ref.SequenceNameExists("Bar") <-- generates error. I used Object reference as I don't see any SequenceFile type in the Type Palette.