Note: Scripting is include with LabVIEW 2010 - 2013. No extra download or activation is needed. Simply enable in your Tools>>Options Dialog.
What is VI Scripting?
VI Scripting enables users to write a LabVIEW program that can generate and inspect LabVIEW code. It exposes many additional VI Server classes, properties, and methods. It allows you to create new VIs, Front Panel controls, Block Diagram objects and wires as well as traverse diagram object hierarchies and modify code.
For Windows: Download the Windows installer from this page (XP or Vista/7). 32- and 64-bit versions refer to your LabVIEW version, not your OS.
You need to activate VI Scripting before the feature is available in LabVIEW.
- Select Start >> Programs >> National Instruments >> NI License Manager to open NI License Manager.
- Expand the Local Licenses, LabVIEW, and Toolkits items to display the Scripting Development item.
- Right-click the Scripting Development item and select Activate to open the NI Activation Wizard.
- Select the Automatically activate through a secure Internet connection option and click Next. Enter the provided serial number (L12S86758) and click Next.
- Follow the remaining steps in the NI Activation Wizard.
For Mac/Linux: No activation is required (disregard steps 1-5 from above), download the Mac/Linux installer from the following download page.
Documentation and Examples
Getting Started documentation is located at the following path ...\labview\manuals\VI Scripting Getting Started.pdf
Examples are located at the following path: ...\labview\examples\VIScripting
- Drop Add Function.vi – Demonstrates how to create a block diagram object. Programmatically creates a new VI and drops an Add primitive on it.
- Drop Add Function Inside While Loop.vi – Demonstrates how to create a block diagram object in a nested diagram. Programmatically creates a While Loop, then creates an Add primitive inside the loop.
- Drop Round Button.vi – Demonstrates how to create a Front Panel control. Programmatically creates a Round Button Boolean control.
- Drop Digital Numeric Inside Cluster.vi – Demonstrates how to create a nested Front Panel control. Programmatically creates a Cluster with a Numeric inside it.
- Random Strip Chart.vi – The Random Strip Chart is a common “Hello World” program in LabVIEW. Programmatically generates and runs a VI that writes random numbers to a strip chart in a while loop.
- Random Strip Chart with Diagram Cleanup.vi – Instead of worrying about the diagram layout while creating objects, this version of the example drops everything at (0,0) then runs the Diagram Cleanup tool programmatically to clean up the block diagram code.
- Add Control to Connector Pane.llb/vi – Demonstrates how to associate Front Panel controls with the Connector Pane for use as a SubVI.
- Connector Pane Pattern Reference.vi – This VI is provided as reference documentation. It shows which connector pane pattern number corresponds with which layout, as well as the numerical index for each item in the pattern.
As this is an "NI Labs" product, NI will not be supporting LabVIEW Scripting through Applications Engineering. All technical issues should be posted on the API Community.
Future Version Support
The Scripting API is subject to change between LabVIEW versions. NI makes no guarantees that any feature or behavior associated with the Scripting API will either exist, migrate automatically, or have a functionally equivalent behavior in different versions of LabVIEW.