NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

what's going on with re-ordering custom data types?

OK, I can't make heads or tails out of this one:

I've got a bunch of custom data types in my own typedef file (and it's part of my type palettes).

I open up my types browser, select my type file, go browse to the "custom data types" section.

I want them in a different order so I can better understand them.

 

 

ts_types1.png

 

(actually I select the one below it (TekTimestamp) and try dragging it up and down the list. anywhere I go I get the circle with a cross through it saying I can't drag it here.

OK, give up on that one.

 

Then I'll grab TekSimulateMode typedef

Try dragging it around, and I get the nice black line saying I can drag it somewhere else -- looks kinda like this:

ts_types3.png

Notice I dragged it only one spot down, and the item I dragged it across is used in exactly the usage locations, and neither has any nested typedefs (they are only containers of primitive boolean/string).  Also notice that it and everything I dragged it across is owned by this type file.

Once I let up on the mouse, I get this warning message popping up:

ts_types4.png

 

What's up?? Why can't I change the location of the first typedef (ordering) within the file, but I can for the second??

Why do I get this dialog when I move a typedef within a file that already owns it??

 

0 Kudos
Message 1 of 11
(4,331 Views)

I'm not sure I follow your question here.  If you want to re-order the types then just drag them to the spot you want them.  As you drag them a dark line should show up that will indicate where it is going to be dropped.  The same goes for items within a custom container type.

 

Maybe you could give more information and you would get a better solution.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 11
(4,329 Views)

sorry -- I was in the middle of a re-edit when you posted because my fat fingers got to the post button before I managed to finish typing everything.

0 Kudos
Message 3 of 11
(4,327 Views)

Oop.  My bad.  I was so eager to help you out... 🙂

 

I know it has to do with the Usage column.  Since you are changing your Station Globals.ini by dragging them around I think the warning is from there.  I know that once you have instances of them then you are now changing that data type for all those locations.  That's why you can't delete them if you have an instance.  It won't (or shouldn't) affect anything by moving them other than you may now have to save your station globals and sequence files again.  Not sure if it revs the version or not, it doesn't look like it did on mine.

 

As for the one that won't move?  Not sure on that one.  I've never seen that.  Possible some instance is restricting it.

 

Hope this helps some,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 11
(4,324 Views)

Scott,

 

Even I witness this problem & the reason why you aren't able to drag certain variables is because you have used those custom datatypes / variables variables at one or more places in either TekTypes.ini or other Ini files.

 

First identify the instances where this variables was used. Disconnect it from the type def by clicking on "Change Type" button (In types column) and select any datatype for time being.

 

Repeat above step for as many instances that are derived from type def you want to re-order.

 

Now, you should be good to re-order the type def.

 

Now, go back to all instances and again click on "Change Type" button and assign it to original type def.

 

Cheers !

 

 

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

This is a known issue. Drag/drop is treating the operation like a delete and insert. Deletes are not permitted if instances exist in the file. Ideally, the type palette document should realize that it's not actually a delete and insert, but rather a move and allow it to work even if instances exist in the file, however it does not currently work this way.

 

-Doug

0 Kudos
Message 6 of 11
(4,186 Views)

Another workaround that you might prefer is to save the file in the XML format, open it in a text editor and change the "typelistordernum" attribute's value for your types to number them in the order you prefer.

 

-Doug

0 Kudos
Message 7 of 11
(4,180 Views)

Doug --

 

Thanks !!! that extra bit of understanding of where the problem is coming from helps a lot.  I agree it would be nice to see fixed, but I understand proirities right now.

0 Kudos
Message 8 of 11
(4,169 Views)

Doug,

 

How to save MyTypes.ini to XML file? I'm using TS 2010.

0 Kudos
Message 9 of 11
(4,164 Views)

To save mytypes.ini as xml go to the station options dialog, on the file tab, click the File Format Options button. Select the file and change the setting for that file with the combobox at the bottom of the dialog.

 

-Doug

0 Kudos
Message 10 of 11
(4,149 Views)