VI Methods (ActiveX)

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.

MethodDescription
AbortAborts the VI execution. Details
CallCalls the VI as a subVI. Details
Call2Calls 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
CenterFrontPanelSpecifies whether to automatically center the LabVIEW front panel window on the computer screen. Details
CloseFrontPanelCloses the LabVIEW front panel window. Details
DisconnectFromLibraryDisconnects the VI from the owning LabVIEW project library. Details
ExportVIStringsExports 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
FPGetRuntimePosReturns the position of the LabVIEW window at run time. Details
FPRunTimePosRunCenteredSets a VI to center its front panel every time the VI runs. Details
FPRunTimePosRunCustomSets a custom position for the VI to move its front panel to every time the VI runs. Details
FPRunTimePosRunMaxSets a VI to maximize its front panel every time the VI runs. Details
FPRunTimePosRunMinSets a VI to minimize its front panel every time the VI runs. Details
FPRunTimePosRunUnchangedSets the VI to not move its front panel when the VI runs. Details
GetControlValueGets 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
GetLockStateReturns the lock state of the VI and indicates whether the password for the VI is in the password cache. Details
GetVIDependenciesThis 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
ImportVIStringsImports 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
MakeCurValueDefaultChanges the defaults of all controls on the LabVIEW front panel to be the current values. This method is available only in edit mode. Details
OpenFrontPanelOpens 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
PrintPanelPrints 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
PrintVIToHTMLSaves the VI information to an HTML file and saves the graphics in external files. Details
PrintVIToPrinterPrints 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
PrintVIToRTFSaves the VI information to an RTF file. Details
PrintVIToTextSaves 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
ReinitializeAllToDefaultChanges the current values of all controls on the LabVIEW front panel to their defaults. Details
RevertDiscards changes and reloads a VI from disk. Details
RunStarts 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
SaveForPreviousSaves a copy of the VI that is readable by LabVIEW 8.0 and later. Details
SaveInstrumentSaves a VI and synchronizes the VI with the edited version in other application instances before saving. Details
SaveRunTimeMenuSaves 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
SetControlValueSets the value of a named LabVIEW control or indicator. Details
SetLockStateSets 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
SetVIIconSets the image of a VI icon from a file. Details