NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use resStr() to set name of custom Type

OK say I create a copy of Action step type (from NI_Types.ini)  and rename it Mycustomstep and put this in my own Type Palette, "MyCustTypes", folder(MyCustTypes.ini). The Step Type context menu shows "MyCustTypes | Action" instead of "MyCustTypes | Mycustomstep"  nomenclature. When you look in Step Type Menu Editor everything looks the way I expect, MyCustType | Mycustomstep...
 
Thus to update the custom type with my own name I see the resStr() needs to be changed in my custom type properties. Not sure where to navigate to find the nomenclature using the Expression Browser for Default Step Name Expression, property menu. Since the ini is binary I can't read the ini directly...
 
thanks ahead of time
0 Kudos
Message 1 of 5
(4,749 Views)
Hello richjoh!

There are a couple places to "rename" your custom step type, and they all affect different areas.  To get a meaningful name in the .ini file, you actually have to right click on the custom type and rename it.  To customize the name of the type as it appears in the insertion palette, you must right click the custom step type, go to properties, and then to Menu tab.  Here, you can set the name of the step as it will appear in the insertion palette (Item Name Expression) and select or create which folder it will reside in (Group).  Finally, if you change the "Default Step Name Expression" on the General tab, you will be changing the name of the step as it appears when you place the step into your sequence.

For all of these entry fields, you can simply put a literal string.  You do not need to use the resStr() function.  However, if you would like to, you can find where these strings returned from the resStr() function are defined in the <teststand>/components/NI/language/english directory, and add your own entries.

NickB
National Instruments
Applications Engineering
0 Kudos
Message 2 of 5
(4,722 Views)

Hi Nickb,

The Item Name Expression is not accepting my characters, the string I put in turns red.. indicating unknown variable. Btw, I was given this custom type pallete ini file where my custom type, see attached, should be defined. So this may add to the complexity of the problem. I do follow whats your response says should happen...

0 Kudos
Message 3 of 5
(4,715 Views)
When you need to use a literal string in a box that accepts an expression, it is important that you place quotes around the string.  I think that should do it for you!

NickB
National Instruments
Applications Engineering
0 Kudos
Message 4 of 5
(4,711 Views)
Darn quotes... ok got it.
0 Kudos
Message 5 of 5
(4,707 Views)