NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand API C# creating a UI tab for your custom step

In developing a custom step in C#, the step instance will have a set of values, or properties. These are not values that are injected as parameters for the constructor of the C# object, so the parameters on the .NET Adaptor Module tab are not what we want to populate. We want a different set of properties/parameters that the step's C# method will have access to. So how do you create a new tab at the same level as the step's Properties and Module tab, and design a table of properties (name/value) that appear in that panel?

The widget for entering a value may be a different type for each property in the table, although it is known based on the step type. Please correct me if I am wrong, but it does not look like you can create your own custom Adaptor. We did see how you can create an "Edit" substep, which create a Tab with the name of the step type, but the tab only holds a button, which can then launch a dialog. Functionally similar, but not as tight and clean an integration. If there were a way of adding a custom panel within the Properties tab, at the same level as "General", "Run Options", "Looping", "Post Actions", "Switching", etc., that would be the next best option. Thank you.

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

One of my test engineers showed me an NI step type called, "StringValue Test". It had a property, "NI_Data" that has an array of properties called "Edit Panels". These existed in the NIStepTypeControls.dll, in a class, NationalInstruments.TestStand.StepTypeControls.StringValueTestLimitsTabInfo of type String. Is it possible to create your own EditPanel and add it to your custom type?

0 Kudos
Message 2 of 5
(3,364 Views)

I'm pretty certain creating custom UI's for custom step types is not supported out-of-the-box functionality. After searching through our website, there have been a couple of idea exchange posts about this dating back to 2010. A couple relevant posts are linked below.

 

https://forums.ni.com/t5/NI-TestStand-Idea-Exchange/Ability-to-create-user-built-in-StepTypes/idi-p/...

https://forums.ni.com/t5/NI-TestStand-Idea-Exchange/Allow-embedding-of-Edit-UI-into-step-settings-pa...

https://forums.ni.com/t5/NI-TestStand/Adding-Multiple-Numeric-Step-Limits-Edit-Embedded-UI-to-Custom...

Applications Engineering
National Instruments
Message 3 of 5
(3,353 Views)

Hi Daniel,

 

From the URLs, it appears a number of people have asked for this functionality for the same reason, having a dialog with a button that pulls up a panel is clunky. Plus with the functionality described in http://download.ni.com/evaluation/teststand/Creating_Custom_Step_Type_Edit_Tabs_in_the_Sequence_Edit... , it appears that the only step missing is to be able to add the new StepTypeEditPanelTabInfo class to the NI_Data/EditPanels array. Most of the other properties of a StepType are exposed. How do I programmatically add my StepTypeEditPanelTabInfo to my StepType? Thank you.

 

Fred

Message 4 of 5
(3,309 Views)

Hi Fred,

 

Just do it at first excactly as it is descriped in that document. I recomon to start in next step with small application going to your needs (not more than 2 Controls!!) to figure out how this works. If you understand that stuff you will be able to create extremly effective StepTypes.

 

You can do it

 

Juergen

 

 

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 5
(3,274 Views)