Tutorial: Creating and Opening a VI Using VI Scripting

Complete the following steps to create a VI that uses VI Scripting to create and open a target VI.

Note Note  
  • This topic assumes familiarity with the VI Scripting introduction.
  • You must enable VI Scripting to display the VI Scripting VI and functions and use the associated properties and methods.
  1. Select File»New VI to create a new VI.
  2. Add the New VI function to the block diagram.

     Add  Find
  3. Add a Property Node to the right of the New VI function.

     Add  Find
  4. Wire the vi refnum output of the New VI function to the reference input of the Property Node.
  5. Resize the Property Node so it contains three terminals.
  6. Add the following properties to the Property Node.
  7. Right-click the Property Node and select Change All To Write from the shortcut menu.
  8. Create constants for each property and configure the constants to match the block diagram in step 10.
  9. Add the Close Reference function to the right of the Property Node.

     Add  Find
  10. Complete all wiring to match the following block diagram.

  11. Save the VI as ScriptingTutorial.vi.
  12. Run the VI.

LabVIEW creates and opens untitled front panel and block diagram windows.

To continue this tutorial, continue to the Tutorial: Adding an Object to a VI Using VI Scripting topic.