I am trying to understand how custom data types saved in sequence files (not the mytypes.ini file) are handles by TestStand. I was under the impression that any custom data type saved in a sequence file would get a separate namespace (just like a typedef saved in .lvlib would get a separate namespace). But this does not seem to happen. So, Testand cannot load two custom data types with the same name when stored under separate sequence files.
Does this not defy the purpose of allowing the option to save custom data types under the sequence file???!
If you want to reproduce what I am doing:
1. Create new sequence Test1.seq
2. Create new custom data type (container with two numeric elements) and name it Test and save it under the sequence file Test1.seq (not mytypes,ini)
3. Save and Close the Test1.seq
4. Create another sequence Test2.seq
5.Create new custom data type (container with two string elements) and name it Test and save it under the sequence file Test2.seq (not mytypes,ini)
6. Save and Close the Test2.seq
7. Open Test1.seq
8. Try to open Test2.seq. Notice that TestStand now complains with the type conflict dialog box (as shown below).
I would have expected teststand to allow types with same name , but saved in different sequences to be loaded at the same time.
Is there any other way of achieving this (other than manually naming the custom types differently)
Solved! Go to Solution.
Unfortunately the TestStand engine can only have a typedef in memory with a unique name. Because of this you are seeing your issue.
FYI- It doesn't matter where the typedef comes from (.ini, .seq, .whatever), the engine only has 1 instance in memory and all instances of that type point to the "active" (loaded) one. Hence, why the dialog to allow you to decide which one becomes active/loaded.
My understanding is that the reason they store the typedef to the .seq file is so that you can move them around from machine to machine without having to bring all the typedefs along with it.
If you are in the type palette you can click on All Types under Other to see which types are loaded currently.
Thank you jigg. Tt makes sense now. I will go down the path of adding a unique prefix to the type names
On further thought, I wonder how teststand diff tool handles this?... If for example, you want to compare a sequence in your workspace with the head revision in your SVN (or any other) repository, then the two sequences will have to be loaded to memory at the same time..which means the two typedefs (with same name) will have to be loaded? .....
In the Diff tool go to Edit>>Options....
Uncheck the Automatically Merge Types checkbox. Then you can see the type differences just fine. You can read more about the options by clicking the Help button on the dialog.
Hope this helps,
I believe you still have to resolve the type differences before the diff tool will show you other differences.
Edit: Nevermind. I lied. It will still show differences. Just not allow you to edit differences until the type conflicts become resolved.