LabVIEW APIs Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Scripting

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.

 

 

Installation Instructions

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.

  1. Select Start >> Programs >> National Instruments >> NI License Manager to open NI License Manager.
  2. Expand the Local Licenses, LabVIEW, and Toolkits items to display the Scripting Development item.
  3. Right-click the Scripting Development item and select Activate to open the NI Activation Wizard.
  4. Select the Automatically activate through a secure Internet connection option and click Next. Enter the provided serial number (L12S86758) and click Next.
  5. 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.

 

Technical Support

 

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.

Comments
pylb
Member
Member
on

I am not NI, but according to NI support I contacted last month it is still not officially supported:

"You e-mailed earlier about your problem with programmatically placing a probe on a wire within a VI. We do not currently support VI Scripting and as such all technical issues should be posted on the API community on the following link:

http://decibel.ni.com/content/groups/labview-apis

This stance is repeated in the download page for VI scripting:

http://sine.ni.com/nips/cds/view/p/lang/en/nid/209110

So we are unable to file a CAR at this time as VI scripting is not supported."


If anyone from NI has any hint on when that would be supported that'll be great.

Pierre-Yves

FabiolaDelaCueva
Active Participant Active Participant
Active Participant
on

This stance is repeated in the download page for VI scripting:

http://sine.ni.com/nips/cds/view/p/lang/en/nid/209110

So we are unable to file a CAR at this time as VI scripting is not supported."

NI, that statement is ridiculous! VI Scripting has been part of the shipping product for a while now, so users would not get to see the " stance repeated when downloading it", because users would not have to download it. They just need to go to their Options menu and select in the VI Server section that they want to have access to LabVIEW Scripting.

Thanks Pierre for providing that quote.

I am ok with NI saying that the support will be done through forums, but they should probably add that to the Options menu entry, so users know where to go. Saying that it is because it is a NI Labs product is not a reason since it ha been shipping with the product for a while now.

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
Contributors