NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

What controls the order of types in the type paette listing

Solved!
Go to solution

TS2012

 

I've got a bunch of custom types in my sequence file, and when I go to the types palette and look at the types associated with my sequence file they are in "random order" that isn't very useful to me -- I'd rather they are in a specific order that groups them by the category of tasks they do.   Basically I want to be able to manaully specify the order of the types.  Even worse, as I edit some of the types, their order changes and after the edit they get inserted at some other location in the middle of the list (not very helpful).

 

The sequence editor UI doesn't provide a way to "Grab" a type and drag it around to manually update the order, or be able to sort on the column headers for the type palette.  (Shucks -- that would be way too convenient here).

 

So... try to reverse engineer this and make it happen myself.

 

There seems to be 2 different possible ordering pieces of information for types that I can find.

1) the order they exist in the sequence file if I save it as XML and start reading from the top to the bottom.

2) the typelistordernum of that specific type

 

I have a case where if I open the type palette in sequence editor, I see

TypeA

TypeB

TypeC

TypeD

TypeE

 

If I open sequence file in text editor, I see

TypeD (typelistordernum 49)

TypeE (typelistordernum 50)

TypeC (typelistordernum 51)

TypeB (typelistordernum 52)

TypeA (typelistordernum 29)

 

Neither the order in the sequence file, nor the type list order number seems to dictate the order that they display in the sequence editor types palette.

 

I verified that each of the types in the example are used ONLY in this one sequence file -- not shared in any other type palettes of type files or sequence files.

 

If I write some code to load the sequence file, get a reference to it, typecast it to a propertyObjectFile and retrieve the TypeUsageList for that file, I get a ordered list that matches the typelistordernum order.  I can call the MoveType method against that TypeUsageList to reorder elements in the type list and save the sequence file.  The next time I open the sequence file, the tool retrieves the TypeUsageList for the sequence file in question and the order and numbers are the same as what I saved the last time, but the order of the types as viewed from the Sequence Editor types palette is no different (my sorting tool didn't help that view).

 

Any suggestions here as to what is going on, and how I can make sens of how the order of types is shown in the sequence editor type palette, and what I can do to get my types "sorted" the way I want.

 

 

0 Kudos
Message 1 of 5
(3,312 Views)

Did you try step type menu editor.You get this by right clicking on the type palettes.

Here you can arrange the step types,put it under specific (create if requried) folders.Also it can be re arranged.

0 Kudos
Message 2 of 5
(3,300 Views)
Solution
Accepted by topic author warren_scott

1) Yes, you can reorder types in the type's view via drag and drop. At least as of version TS 2012 this now works reliably.

2) The typelistordernum does define the order the types are shown in the types view.

3) You can sort the columns in the types view.

 

Perhaps you accidentally sorted one of the columns in the types view and the sequence editor is remembering that so what you are seeing is actually the sorted order based on one of the columns.

 

I'm pretty sure drag/drop is disabled when you have a column sorted so this very well explains what you are seeing. Check your sort headers for that view and make sure you don't have any up/down arrows.
 

Hope this helps,

-Doug

0 Kudos
Message 3 of 5
(3,290 Views)

It is working "just fine".

Don't know how I got off onto a crazy whirlwind.

 

I think part of it could have been that my types were sorted by version number (found the little arrow in the column header), but I didn't see any logical sorting of the version numbers so I didn't believe they were actually sorted by version number.

Turns out that sort by version number sorts by the version number string, not treating them as an actual version  number.  (meaning version number 20.1.2.3 is after both 1.0.0.0 and 19.0.0.0, but it is _before_ 3.0.0.0).

 

Thanks for helping me out (and thanks for getting that type reorder bug fixed, even if I couldn't manage to figure out how to make it work  😉  )

0 Kudos
Message 4 of 5
(3,285 Views)

I've added a request to our tracking database to make this issue easier for someone to figure out by giving an error on drag/drop explaining the issue rather than disabling drag/drop.

 

I'll also write one about the version sort order. I agree it would be best to sort based on numerical value. Thanks for letting us know.

 

-Doug

0 Kudos
Message 5 of 5
(3,282 Views)