From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

NI VeriStand View System Definition Workspace Tool

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.

    Software

  • Veristand

Code and Documents

Attachment

Description

Overview

 

When you deploy a VeriStand Project, it locks the system definition object within the project. However, it can be beneficial to be able to look at configuration settings within the system definiton without undeploying the project. To do this, you can either right-click and the system definition in the project and select "Explore" then manually open the file on disk or use this workspace tool.

 

Description

 

The code for this is fairly simple. Since the workspace tool will run within the VeriStand context, it uses the "Get Active System Definition" function from the VeriStand palette to get the path to the system defintion then makes a sys exec call to that file path to load up the system definition file in the system explorer outside of the project.

 

code.JPG

 

Steps to Implement or Execute Code

  1. Download the attached files and open the project.
  2. Build the "ViewSysDef LLB" build specification.
  3. Add the tool to your workspace tools menu dropdown. For directions on doing this, refer to the "Adding the tool to the Workspace" section of this tutorial. When you specify the path to your workspace tool, navigate to within the LLB you built in step 2 and select the "ViewSysDef.vi" file (which should be the top level item in the LLB).
  4. Open your VeriStand workspace and select Tools >> "Name you gave in step 3" to run the code:

 

workspace.png

 

You should see your system defintion open within a seperate instance of the System Explorer whether you're deployed or not.

 

Requirements

Software

 

NI LabVIEW 2014+

NI VeriStand 2014+

 

Hardware

 

None

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

Contributors