Requires: Base Development System
A VirtualInstrument object exports methods that affect a given VI. A VirtualInstrument object is instantiated by invoking the GetVIReference method on the Application object.
Note Methods parameters denoted by [] are optional for that method. |
Refer to the ActiveX Enumerations for more information about enumerations used in various properties.
Method | Description |
---|---|
Abort | Aborts the VI execution. Details |
Call | Calls the VI as a subVI. Details |
Call2 | Calls the VI as a subVI. Optionally, you can open the front panel of the VI and close it after the call is over. You also can suspend the VI when called. Details |
CenterFrontPanel | Specifies whether to automatically center the LabVIEW front panel window on the computer screen. Details |
CloseFrontPanel | Closes the LabVIEW front panel window. Details |
DisconnectFromLibrary | Disconnects the VI from the owning LabVIEW project library. Details |
ExportVIStrings | Exports the following strings about VI and LabVIEW front panel objects to a tagged text file: VI name and description, object caption labels, object free labels, default data (string, table, path, and array default data), private data (listbox item names, table row and column headers, graph plot names, graph cursor names, graph annotation names, and tab control page captions), and polymorphic VI data (instance names in the polymorphic VI and selector shortcut menus). Details |
FPGetRuntimePos | Returns the position of the LabVIEW window at run time. Details |
FPRunTimePosRunCentered | Sets a VI to center its front panel every time the VI runs. Details |
FPRunTimePosRunCustom | Sets a custom position for the VI to move its front panel to every time the VI runs. Details |
FPRunTimePosRunMax | Sets a VI to maximize its front panel every time the VI runs. Details |
FPRunTimePosRunMin | Sets a VI to minimize its front panel every time the VI runs. Details |
FPRunTimePosRunUnchanged | Sets the VI to not move its front panel when the VI runs. Details |
GetControlValue | Gets the value of the named LabVIEW control or indicator as variant data. Use the LabVIEW Variant to Data function to convert the data to another LabVIEW data type. Details |
GetLockState | Returns the lock state of the VI and indicates whether the password for the VI is in the password cache. Details |
GetVIDependencies | This method returns the names and paths of the VI dependencies of a VI. You can use this method to return a specific subset of the total set of VI dependencies of a VI. This method does not return non-VI dependencies, such as project libraries, XControls, classes, and statecharts. Details |
ImportVIStrings | Imports the following strings about VI and LabVIEW front panel objects from a tagged text file: VI name and description, object caption labels, object free labels, default data (string, table, path, and array default data), private data (listbox item names, table row and column headers, graph plot names, graph cursor names, graph annotation names, and tab control page captions), and polymorphic VI data (instance names in the polymorphic VI and selector shortcut menus). Details |
MakeCurValueDefault | Changes the defaults of all controls on the LabVIEW front panel to be the current values. This method is available only in edit mode. Details |
OpenFrontPanel | Opens the LabVIEW front panel window. If the front panel is already open, this method changes the state of the front panel window to the state you wire to this method. Use the CloseFrontPanel method to close the front panel window. You also can use the FPState property to set the state of a front panel window that is already open. Details |
PrintPanel | Prints just the LabVIEW front panel to the current printer. You cannot use this method to print a block diagram, list of controls, or polymorphic VI front panel. Details |
PrintVIToHTML | Saves the VI information to an HTML file and saves the graphics in external files. Details |
PrintVIToPrinter | Prints the VI information to a printer. If you use this method in a stand-alone application or DLL, LabVIEW prints only the front panel. Details |
PrintVIToRTF | Saves the VI information to an RTF file. Details |
PrintVIToText | Saves the VI information to a text file. You cannot save the icon, connector pane, front panel, block diagram, subVI icons, and VI hierarchy to text. Details |
ReinitializeAllToDefault | Changes the current values of all controls on the LabVIEW front panel to their defaults. Details |
Revert | Discards changes and reloads a VI from disk. Details |
Run | Starts the VI execution, similar to the Run button in LabVIEW. This method is different than calling a VI because it uses the current values of all front panel controls for execution rather than using data passed in through parameters. This method also ignores the ShowFPOnCall property of a VI and the CloseFPAfterCall property. You cannot use this method to run a VI that is already reserved for execution by another VI. Details |
SaveForPrevious | Saves a copy of the VI that is readable by LabVIEW 8.0 and later. Details |
SaveInstrument | Saves a VI and synchronizes the VI with the edited version in other application instances before saving. Details |
SaveRunTimeMenu | Saves the LabVIEW run-time menu to a file specified by filePath. This method works only when the VI is running. It saves only menu items with valid tags. Details |
SetControlValue | Sets the value of a named LabVIEW control or indicator. Details |
SetLockState | Sets the lock state of a VI. If Interactive is FALSE (default), you can use Password to unlock a password-protected VI or set the password of an unprotected VI. If Interactive is TRUE, LabVIEW ignores Password and displays a dialog box that prompts you to change the lock state. Details |
SetVIIcon | Sets the image of a VI icon from a file. Details |