Discussion:
How do I save a type for a previous version of TestStand (4.0 --> 3.5)?
(too old to reply)
Chris_Farmer
2008-07-23 05:40:11 UTC
Permalink
I have a number of step-types saved in a type file, in TestStand 4.  I would like to use this file in TestStand 3.5.  Is there any way of saving this file for TestStand 3.5.  I have gone into each step-type and custom-type defined in the type file, and under the Version tab, selected the "Set earliest TestStand Version that can use this type", to 3.5.0.725.  However, still this file is not openable in TestStand 3.5.
 
Thanks
Ray Farmer
2008-07-23 05:40:11 UTC
Permalink
Hi,
 
Are you using the files in <TestStand 4>\Components\Compatibility\<VersionNumber> in your TS3.5?
 
Regards
Ray Farmer
Chris_Farmer
2008-07-23 06:10:12 UTC
Permalink
No.
 
How does one do that?
Ray Farmer
2008-07-23 06:10:12 UTC
Permalink
Hi,
Use the version of the file(s) found in your TS4.0 folder at  \Compatibility\<VersionNumber> and copy them to your TS3.5 folder found at <TestStand>\Cfg\TypePalettes.
Remember to bake up your folders before you starts.
Regards
Ray Farmer
Chris_Farmer
2008-07-24 04:40:09 UTC
Permalink
Hi Ray,
 
So, what I've justr tried is this:
 
Copied types from TS 4\Components\NI\Compatibility\3.5 to TS 4\Components\NI\Type Pallettes
 
Open TS4 and opened up my type file. - What exactly do I need to do here, if anything?
 
Saved all.
 
Copy types from TS 4\Components\NI\Type Pallettes to TS 3.5\Components\NI\Type Pallettes.
 
Open TS 3.5 - error loading types!
 
Thanks for all of your help on this!
Ray Farmer
2008-07-24 05:40:08 UTC
Permalink
Hi Chris,
You need to copy from TS 4\Components\NI\Compatibility\3.5 to <TestStand3.5>\Cfg\TypePalettes.
( they are not saved in the save place as TestStand4.0, you dont need to do anything to the TS 4\Components\NI\Type Pallettes  folder)
 
Then switch to your TestStand 3.5 and open TestStand 3.5.
You dont have to do anything with your TestStand 4
 
Regards
Ray
Chris_Farmer
2008-08-08 00:40:21 UTC
Permalink
Hi Ray,
 
I've just tried this suggestion, but was still unsuccessful.
 
I copied the Types as you suggested. I even copied the types into <TestSTand 3.5>\Components\NI\TypePalettes as well.
 
I opened up TestStand 3.5, opened the Types Palette.
 
I then customised the palette, and tried to add the problematic type file.
 
It still says that the type file was saved in TestStand 4, and is incompatible with TestStand 3.5
 
Thanks for your on-going assistance!Message Edited by Chris_Farmer on 08-08-2008 10:13 AM
Ray Farmer
2008-08-08 05:40:12 UTC
Permalink
Hi Chris,
Ok, I'll have a look at this later today and get back to you.
Regards
Ray
Manooch_H
2008-08-08 16:10:15 UTC
Permalink
Hello Chris,You have a couple of options for doing this. The first option is a workaround explained in this KnowledgeBase Article:<a href="http://digital.ni.com/public.nsf/allkb/0C0504151A6C48828625729F006ED2A4?OpenDocument" target="_blank">KnowledgeBase: Saving Type Palette For Previous Version</a> The second option involves programmatically saving the Type Palette to a previous version using the TestStand API. To do this, you must first get a reference to your type palettes using Engine.GetTypePaletteFileList. This returns an array of object references for your Type Palettes. Then, you would find the index for the Type Palette you want to save and use PropertyObjectFile.WriteFile(). For the parameter of this method you would select the version of TestStand you want to save the types for. I've attached an example 4.0 sequence that demonstrates this.Please let me know if this works for you.


TypePaletteWriter401.seq:
http://forums.ni.com/attachments/ni/330/20827/1/TypePaletteWriter401.seq
Ray Farmer
2008-08-08 20:40:16 UTC
Permalink
Hi Manooch_H and Chris,
The 2nd suggestion would seems to be the route to take but doesn't seem to do what Manooch suggests. If you try to save a palette out as a previous version eg TS4.1 to TS3.5 then the WriteFile wants the compatibility version in the Compatibilty TS3.5 folder otherwise it generates an error.
"An error occurred calling 'Writefile' in PropertyObjectFile' of NI TestStand API 4.1. The compatibility type palette files for selected version could not be found"&nbsp;
Also you need to change the Path as it will overwrite the Current version. Again not what you want. Therefore, you can not seem to do what Chris wants to do because you need the compatibility version file to create the previous version type palette file.&nbsp; (Manooch, Maybe I doing something wrong...)
So the first option seems to be the only workable solution.
Point to bear in mind.
Adding Types to a SequenceFile Types then saving out to a previous version doesnt modify the Type fully if you dont have a compatibility file. ie Take the "Default Step Name Expression" of a Custom Step Type contains ResStr("CUSTOM_STEPTYPES", "DEFAULT_STEP_NAME").
This resource strings don't exist in Version 3.5 or lower and therefore when you load the SequenceFile into the previous version of TestStand eg TS3.5 it will generate an error.
&nbsp;
Regards
Ray Farmer
&nbsp;
&nbsp;Message Edited by Ray Farmer on 08-08-2008 09:24 PM
Ray Farmer
2008-08-10 17:40:10 UTC
Permalink
Hi,
Here is an example (Previous Version.zip) that highlight the pitfalls of creating a Step Type as detailed in the knowledgebase. Just follow the Readme.doc contained in the zip file. This example assumes you haven't used the compatibity file for TS3.5 found in the second example.
The second example (Type Conflict.zip) highlights the difference it makes&nbsp;using the Compatibilty file. Again just follow the Readme.doc file.
I hope these examples can be used to enhance the NI TestStand Advanced Series: NI TestStand Type Management Best Practices found at <a href="http://zone.ni.com/devzone/cda/tut/p/id/7022" target="_blank">http://zone.ni.com/devzone/cda/tut/p/id/7022</a>.
Regards
Ray Farmer
&nbsp;Message Edited by Ray Farmer on 08-10-2008 06:21 PM


Previous Version.zip:
http://forums.ni.com/attachments/ni/330/20837/1/Previous Version.zip


Type Conflict.zip:
http://forums.ni.com/attachments/ni/330/20837/2/Type Conflict.zip
Manooch_H
2008-08-12 17:40:16 UTC
Permalink
Hi Ray, You are right that the previously posted sequence file overwrites the current type file. I've updated the attached TS 4.0 sequence file correcting this behavior and providing a bit more modularity. I don't know about the error you are receiving:"An error occurred calling 'Writefile' in
PropertyObjectFile' of NI TestStand API 4.1. The compatibility type
palette files for selected version could not be found"I've tested this sequence out in TestStand 4.0 as well as TestStand 4.1 and did not receive any errors. The new sequence prompts the user for the previous version they are saving for and creates a new type file with that input appended to the end of the file name. The created type files will still be in the same directory as the current file types so they can either be copied to the proper directory for the selected previous version or they can be navigated to when adding types to the previous version.I appreciate you following up on my previous post and bringing this to my attention. Let me know if there is a discrepency in the updated sequence file.


TypePaletteWriter40_Update.seq:
http://forums.ni.com/attachments/ni/330/20859/1/TypePaletteWriter40_Update.seq
Ray Farmer
2008-08-12 18:40:14 UTC
Permalink
Hi Manooch,
Thanks for the update.
(Maybe the error was because&nbsp; I was using a beta version of 4.1!)
I tried your new sequencefile, much better, but it does need a little tweak. I looked at the resultant type file and although it had _35 appended to the file name it was infact a version 3.1.
I spotted the problem, the WriteFile has the enum of WriteFileFormat_TestStand31. I couldn't see anywhere in the sequence where this setting was changed. I changed the API call to use a Locals and set this after the MessagePopup so that the value was equal to 7 for version 3.5.
This produced the correct version of type file.
Regards
Ray

Loading...