Example Code

Programmatically add an expression to the Post Actions of Steps

Code and Documents

Attachment

Overview

This example adds a Post Expression to steps that use the <None> Adapter.

 

Description

The attached Sequence prompts the user for a sequence file, then looks for all of the no adapter step types and adds what is entered in the AddPostExpr local to the Post Expression of those steps. This can be modified on what steps to add this to by changing what the If step is selecting.

 

Hardware and Software Requirements

TestStand 17 or compatible

Steps to Implement or Execute Code

1. Open the attached TestStand Sequence File "Programmatically add Post Expressions to Steps.seq"

2. Run MainSequence

3. In the file dialog message popup, select a file in which you want to add Post Expressions

 

 

**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

National Instruments
Applications Engineer

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

Comments
jm169896
Member
Member
on

This code is really close to being the tool I've been searching for...  I want to add a post-expression to all of the steps in my TestStand sequence that call a vi named, "HSDIO PMBus Write.vi."  However, I'm not sure how to modify the "if" statement in this code to make it key off of the vi filename.  I appreciate any help you can offer!

Contributors