Example Code

TestStand AutoPropsPanel Whitepaper and Tutorial

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Operating System

  • Windows

    Other

  • TestStand 2020

Code and Documents

Attachment

Description

TestStand 2020 includes the AutoPropsPanel, a feature to simplify implementation of step settings controls for custom step types.  You can use the AutoPropsPanel feature to create step setting controls for custom step types.  The AutoPropsPanel provides the panel for a custom edit tab in the Sequence Editor and the dialog for an edit substep for TestStand custom user interfaces.  After configuring a custom step type to invoke this control, you tag certain properties of the step type as AutoPropsPanel settings using attributes.  At edit time, the AutoPropsPanel dynamically configures itself based on these attributes.  External code modules and associated programming expertise are not required to implement an AutoPropsPanel.  The AutoPropsPanel feature is ideal for:

  1. Step designers new to creating custom step settings panels
  2. Rapid prototyping
  3. Custom step types with very simple user interface requirements

This package contains documentation about the AutoPropsPanel feature introduced in TestStand 2020.  It includes:

  • CreatingAnAutoPropsPanelStepType.pdf (and supporting files) -- A tutorial about creating AutoPropsPanel step types in TestStand.
  • AutoPropsPanelWhitePaper.pdf -- A whitepaper explaining the AutoPropsPanel feature in more detail.
  • AutoPropsPanel.seq -- Sequence file containing template AutoPropsPanel step types.  Copy these to create your own AutoPropsPanel step types. (Avoid modifying this file.)

 

 

How to Use

This example requires NI TestStand 2020 or higher.

If you are not already familiar with the AutoPropsPanel feature, it is recommended you execute the CreatingAnAutoPropsPanelStepType.pdf tutorial before reading the whitepaper.

 

 

Additional Information

This example is provided as-is and is for demonstration purposes only.

 

The included tutorial and whitepaper are targeted at step designers.  Familiarity with the TestStand Sequence Editor, the Types View, custom step types, expressions, and attributes is assumed.

 

 

Related Links

 

 

 

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
0xJed
Member
Member
on

Note to anybody who downloaded during NI Connect today: The document CreatingAnAutoPropsPanelStepType.pdf somehow got corrupted.  I recreated the PDF and updated the ZIP package.  Please reply here if you bump into any issues.  I apologize for the inconvenience.

nocomment
Member
Member
on

Hello,

thanks for this nice addition to TS, I think it's really useful to present test developers a nice interface to step parameters, without having to develop custom panels in Visual Studio.

 

But I still have one thing I couldn't figure out and, unfortunatly, even in the whitepaper it is not covered in detail, and that is the UseExpression option. I managed to create step types with containers containing standard data types, declare them with UseExpression=True (Expression field is shown in the panel) and enter a valid Expression, but at runtime, this is not evaluated and the step action takes basically the default value of the data.

 

What do I have to do to update the step data with the entered expression? Is there an already defined pre-step (or post-step in case of outputs) action, which can do that? Or do I have to manually evaluate the Expression, which is saved in the NI.AutoPropsPanelInstanceSettings container in the step data attribute?

 

I know this is a new and probably not completely polished feature, but I think it would be useful to make it a bit more user friendly to step developers 😉

 

Nevertheless, I would be glad if someone could answer this question, it would help me a lot!

 

Cheers,

Tobias

Contributors