NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence version number. How to change it outside the Sequence Editor?

Solved!
Go to solution

I'd like to change the sequence version number from outside the sequence. Is there way to to this? Can I call TS Engine from LV and using API do the change?

 

I've to do this even without making any substantial change within the system to reflect the change of the configuration files to which my sequence talks.

 

Thanks.

0 Kudos
Message 1 of 11
(5,202 Views)

If you have the TestStand Engine in LabVIEW, you can call the following:

 

Engine.ReadPropertyObjectFile

 

then set

 

PropertyObjectFile.Version on it.

0 Kudos
Message 2 of 11
(5,202 Views)

Ta da!!!

 

Thanks for confirmation.

0 Kudos
Message 3 of 11
(5,199 Views)

I forgot to add you need to save the file after you modify it.  You can call PropertyObjectFile.SaveIfModified to do this.

0 Kudos
Message 4 of 11
(5,195 Views)

Allen,

 

There is no something like ReadPropertyObjectFile under the IEngine methods.

 

I started from Application manager - > Get Engine  and search IEngine methods and properties.

0 Kudos
Message 5 of 11
(5,191 Views)

It looks like this method was added in 2010.

 

You'll need to call this instead:

 

Engine.NewPropertyObjectFile 

 

Set PropertyObjectFile.Path

 

Call


PropertyObjectFile.ReadFile

0 Kudos
Message 6 of 11
(5,179 Views)

Please find the files attached.

 

It looks like I can read version number change it but I cannot save.

 

Any help?

Download All
0 Kudos
Message 7 of 11
(5,161 Views)

I forgot one last step, you need to call PropertyObjectFile.IncChangeCount after you modify the version.

0 Kudos
Message 8 of 11
(5,145 Views)

I'm sorry for constantly asking but still something is wrong.

 

Despite fact that I have the message "Save changes to  Seq1.seq?" pressing yes the version number is still not saved 😞

 

 

0 Kudos
Message 9 of 11
(5,142 Views)
Solution
Accepted by topic author MimiKLM

I have attached a sequence file that does what you want.

 

There was a missing step to Read the file.  You need to call PropertyObjectFile.ReadFile after PropertyObjectFile.Path to load the existing one.

 

I ran your example and noticed there were no error wires.  I also noticed that you were not starting the Application Manager or shutting it down.  It's possible that may be part of the problem.  I get an error when running your VI that states "Access Denied" when writing the file. you are getting a similar error but it is not showing up.  I modified the path of the sequence file to be the absolute path, and now it works properly.  I think you may have been getting an error but because no error wires were hooked up, it appeared as if there was no problem.  The path must be an Absolute path for the PropertyObjectFile.Path property.

 

-Allen P.

0 Kudos
Message 10 of 11
(5,138 Views)