NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Clone A SequenceFile

How can I clone or copy a SequenceFile on my C Code?
NB : I 've the SequenceFile object with the API : engine->GetSequenceFile ...
0 Kudos
Message 1 of 3
(3,192 Views)
Breizh -
You can try Engine.GetSequenceFile().AsPropertyObject().Clone, but I think that this does not work because the new file is not in the sequence file cache.

Another option is to use Engine().GetSequenceFile().AsPropertyObjectFile().Data().Serialize to serialize the data portion of the file and Engine.NewSequenceFile.AsPropertyObjectFile().Data().Unserialize() to reconstitute the data into the new file.

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 3
(3,192 Views)
Thank you.

I've another idea, i can use :
SequenceFile.Save ( pathString)

With this method, i've a copy of my sequence file.

It works, but when i launch once again my code, there is an error : "File already exists."
("Unable to save sequence file as 'c:\temp\Temporary Sequence.seq' because a sequence file with that path is already loaded.)

I 've tried to releases the SequenceFile object from the engine internal cache with engine->ReleaseSequenceFileEx. But i've the same error.
0 Kudos
Message 3 of 3
(3,192 Views)