VI Methods

This table lists the various methods you can invoke from the Invoke Node for the Virtual Instrument Class.

MethodDescription
Abort VIStops the VI execution. Details
Export VI StringsExports the following strings about VI and front panel objects to a tagged text file: VI name and description, object caption labels, panel free labels, default data (string, table, path, and array default data), and private data (list box item names, table row and column headers, graph plot names, graph cursor names, and tab control page captions). This performs similarly to the project menu item. Export VI Strings also contain parameters. Details
Get All Control ValuesGets the values for all the controls or all the indicators in a VI parameter. Get All Control Values also contain parameters. Details
Get Control ValueGets the value of the named control as flattened data. The first time you call this method on a VI whose front panel is not open, this method returns the default values of the control rather than the actual values. Thereafter, it returns the actual value. Details
Get Front Panel Scaling ModeGets the scaling mode for the front panel. The output parameter Scaling Mode indicates the scaling mode as follows: 0 - no scaling; 1 - scale all objects with panel; 2 - scale single object with panel. If scale single object with pane is selected, the parameter Scalable Object returns a reference to the Front Panel control/indicator that is set to scale. In the other cases, Scalable Object returns Not a Reference. Details
Get Lock StateReturns the lock state of the VI. It also tells whether the password for the VI is in the password cache. Get Lock State also contains parameters. Details
Get Panel ImageReturns the panel image as a bitmap and color table. Details
Import VI StringsImports the following strings about VI and front panel objects from a tagged text file: VI name and description, object caption labels, object free labels, default data (string, table, and array default data), and private data (list box item names, table row and column headers, graph plot names, graph cursor names, and tab control page captions. This performs similarly to the project menu item. Import VI Strings also contain parameters. Details
Make Current Values DefaultChanges the defaults of all controls on the front panel to be the current values. Details
Print Panel To PrinterPrints just the front panel to the current printer. If Entire Panel is false (the default), then only the currently visible portion of the panel is printed. You cannot use this method to print a polymorphic VI front panel, block diagram, or list of controls. Details
Print VI To HTMLPrints the VI information to an HTML file and the graphics are saved in external files. Print VI to HTML also contains parameters. Details
Print VI To PrinterPrints the VI information to a printer. Print VI to Printer also contains parameters. Details
Print VI To RTFPrints the VI information to an RTF file. Print VI to RTF also contains parameters. Details
Print VI To TextPrints the VI information to a text file. Print VI to Text also contains parameters. Details
Reinitialize All To DefaultChanges the current values of all controls on the front panel to their defaults. Details
Revert VIDiscards changes and reloads a VI from disk. Details
Run VIStarts the VI execution, similar to the Run button. This is significantly different from calling a VI in that the current values of all front panel controls are used for execution (no parameters are passed). This method also ignores the Show FP on Call property of a VI and the Close After Call property. Details
Save For PreviousSaves a copy of the VI that is readable by LabVIEW version 6.0 and later. Details
Save InstrumentSaves a VI. Details
Save Run-Time MenuSaves the Run-Time menu to a file specified by path. This method works only when the VI is running. Saves only menu items with valid tags. Details
Set Control ValueSets the value of the named control with flattened data. Details
Set Front Panel Scaling ModeSets the scaling mode for the front panel. The input parameter Scaling Mode selects the scaling mode as follows: 0 - no scaling; 1 - scale all objects with panel; 2 - scale single object with panel. If scale single object with panel is selected, the parameter Scalable Object must be wired with a valid reference to a Front Panel control/indicator or an error is reported. Details
Set Lock StateSets the lock state of a VI. If interactive is False (default), password is used to either unlock a password protected VI or set the password of an unprotected VI. If interactive is true, password is ignored and a dialog is presented to change the lock state. Set Lock State also contains parameters. Details
Set VI IconSets the icon of a VI from an image file. Details