03-02-2007 12:19 PM
03-05-2007 01:17 PM
03-05-2007 02:40 PM
Here are what I did after launch the operator interface:
1) Call Engine.GetSequenceFileEx to get a reference to a sequence file.
2) Display steps of MainSequence of the sequence file in GUI.
3) Call Engine.GetStationModelSequenceFile to get a reference to the station process model sequence file. The variable used to save the reference of process model sequence file is modelSequenceFile.
4) Loop through all the sequences in process model sequence file, get the references of entrypoint sequences in the process model and put them in a container (VB Collection).
At this point,
Calling modelSequenceFile.CanUnload returns TRUE
Calling modelSequenceFile.IsExecuting returns FALSE
Calling Engine.ReleaseSequenceFileEx(modelSequenceFile, ReleaseSeqFile_UnloadFile) returns FALSE
There is no other loaded process model sequence file reference at this point.
03-05-2007 05:12 PM
03-06-2007 04:27 PM
Thanks for the hint, Allen. It turns out that the references of entry point sequences of process model file are held in a VB collection entryPointSequences. The code to release these sequences is taken over from operator interface for TestStand v2, probably from NI's operator interface example:
Set entryPointSequences = New Collection
This code does not really release the sequences in the container. I have to loop through each reference of sequence to set it to Nothing:
For i =1 to entryPointSequences.Count
Set entryPointSequences(i) = Nothing
Next i
This eliminates the warning of unreleased objects.