05-13-2011 07:24 AM
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.
Solved! Go to Solution.
05-13-2011 07:33 AM
If you have the TestStand Engine in LabVIEW, you can call the following:
Engine.ReadPropertyObjectFile
then set
PropertyObjectFile.Version on it.
05-13-2011 07:46 AM
Ta da!!!
Thanks for confirmation.
05-13-2011 07:53 AM
I forgot to add you need to save the file after you modify it. You can call PropertyObjectFile.SaveIfModified to do this.
05-13-2011 08:53 AM - edited 05-13-2011 08:54 AM
Allen,
There is no something like ReadPropertyObjectFile under the IEngine methods.
I started from Application manager - > Get Engine and search IEngine methods and properties.
05-14-2011 12:29 PM
It looks like this method was added in 2010.
You'll need to call this instead:
Engine.NewPropertyObjectFile
Set PropertyObjectFile.Path
Call
PropertyObjectFile.ReadFile
05-16-2011 06:11 PM
Please find the files attached.
It looks like I can read version number change it but I cannot save.
Any help?
05-17-2011 10:28 AM
I forgot one last step, you need to call PropertyObjectFile.IncChangeCount after you modify the version.
05-17-2011 11:58 AM
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 😞
05-17-2011 01:43 PM
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.