Access the Relative Path of the TestStand Workspace Using the TestStand API in LabVIEW

Updated Apr 11, 2023

This article will show you how to use the LabVIEW TestStand API to  get the relative path of the TestStand Workspace. LabVIEW and TestStand software are required, and prior knowledge of using the TestStand API in LabVIEW would be beneficial.
 

  1. Place a Sequence Context Constant on the block diagram
  2. Right click on the Sequence Context Constant go to Create >> Property for TS.SequenceContextClass >> Engine
  3. Right click on the Engine output and go to Create >> Property for TS.EngineClass >> CurrentWorkspaceFile
  4. Right Click on the CurrentWorkspaceFile Output and go to Create >> Property for TS.WorkspaceFileClass >> RootWorkspaceObject
  5. Right Click on the RootWorkspaceObject Output and go to Create >> Property for TS.WorkspaceObjectClass >> Path
  6. Close out the references Created

The path of the TestStand Workspace can be accessed from the last property node and can be built into a path and used for your application. A screenshot of the LabVIEW code described by the steps above is included below for reference.