Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

How Do I Programmatically Browse A Workspace File in TestStand?

Primary Software: TestStand
Primary Software Version: 4.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
In my Operator Interface I am able to click File»Browse Workspace to load a workspace file into memory. How can I do this programmatically in TestStand and load a workspace file?

Solution:
The Engine.DisplayWorkspaceBrowserDialog(String dlgTitle, long dlgOptions)
method launches a dialog box that lets you select and edit a workspace file.
  • The parameter dlgTitle specifies the title of th dialog box. Pass an empty string to use the default title for the dialog box.
  • The parameter dlgOptions specifies the options for the dialog box, the default value is 0.
    If you insert an Expression Step into the Main block of you Steps Pane and set the expression value to RunState.Engine.DisplayWorkspaceBrowserDialog("",0) this will bring up the default Workspace Browswer Dialog Box.



    __________
However, if you would like to load a workspace file, setting the current workspace file object to the desired workspace file object is recommended:
If you insert an Expression Step into the Main block of you Steps Pane and set the expression value to  RunState.Engine.CurrentWorkspaceFile = RunState.Engine.OpenWorkspaceFile(<WSpathString>,0,ConflictHandler_Error)


Related Links:
TestStand 4.0 Help: DisplayWorkspaceBrowserDialog method help
TestStand 4.0 Help: OpenWorkspaceFile method help
TestStand 4.0 Help: CurrentWorkspaceFile property help

Attachments:





Report Date: 12/04/2007
Last Updated: 12/11/2007
Document ID: 4G3ERIA0

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit