NI TestStand

Showing results for 
Search instead for 
Did you mean: 

ReleaseSequenceFileEx returns always False



I use C# TestStand  Api to get Global variable in my sequence.

I want to use ReleaseSequenceFileEx function to delete sequence file from cache.

But this function returns always false.

You find as below my code :


var myEngine = new Engine();

SequenceFile mySequenceFile = myEngine.GetSequenceFileEx("C:\\SeqFileCars.seq");

PropertyObject machin = mySequenceFile.FileGlobalsDefaultValues;

Console.WriteLine( machin.GetValString("ConfigCars.Version", 1);

Console.WriteLine( machin.GetValNumber("ConfigCars.IdInterface", 1).ToString() );

Console.WriteLine( machin.GetValString("ConfigCars.Level", 1) );

Console.WriteLine( mySequenceFile.AsPropertyObjectFile().Version );
Console.WriteLine(myEngine.ReleaseSequenceFileEx(mySequenceFile, 0)); // False


I add CanUnload and IsExecuting before ReleaseSequenceFileEx function but i get this result as below:

mySequenceFile.CanUnload       => Returns False

mySequenceFile.IsExecuting      => Returns True


I think there is something missed in the code to delete the sequence instance correctly. Please help.

0 Kudos
Message 1 of 1