02-02-2010 09:11 AM
I am trying to unload a particular sequence using Teststand APIs,but I always get the return as false. Attached is the Error popup.
02-02-2010 11:01 AM
02-03-2010 12:14 AM
02-03-2010 04:07 AM
First of all:
It is not possible to unload a sequence unless you unload its sequence file (this is what lordsatish refers to).
What you are trying to achieve is to unload the modules of all steps within a certain sequence. This is quite different.
And i think you need some information on this before getting to an "answer":
Unloading a module from TestStand tells the runtime engine of the module that the module is not used anymore from TestStand. So the runtime engine of the module has to decide if it actually unloads the module or keeps it in memory.
Loading/unloading modules generates overhead in the sequence execution which is most often not desired. So often modules (which are used more than once in a sequence execution) are unloaded only if the module contains serious flaws making it impossible to execute the module more than once after it has been loaded.
So if the reason for your question is the fact that the modules can only execute once after being loaded into memory, i highly recommend you:
Find the flaw and eliminate it!
If you are still interested in an answer:
Just configure your steps using the Unload Option (Step properties => Run Options) to "Unload after Step executes". This setting does exactly what you are trying to achieve with a single difference: The module is unloaded after the steps executio, not after the whole subsequence was executed.
hope this helps,
Norbert