|LabVIEW 2015 Help|
|LabVIEW 2016 Help|
|LabVIEW 2017 Help|
|LabVIEW 2018 Help|
|LabVIEW 2019 Help|
Owning Palette: Application Control VIs and Functions
Requires: Base Development System
Returns a reference to a VI, custom control, or global variable specified by a name string or path to the VI location on disk.
|type specifier VI Refnum (for type only) determines the connector pane information and data type of vi reference. LabVIEW ignores the actual value of this input. By default, the function returns a Generic VI reference. |
If you want to use the vi reference output of this function with the Call By Reference node or the Start Asynchronous Call node, you must wire a strictly typed VI reference to this input.
If you wire a strictly typed VI reference to this input, the connector pane of the VI specified by vi path must match the connector pane of this input.
|application reference is a reference to a LabVIEW application instance. By default, LabVIEW uses the application instance of the calling VI. You can obtain references to other application instances with the Open Application Reference function. If you wire a reference to another application instance to the application reference input, vi path refers to a location in the file system of the computer that is running that application instance.|
|vi path accepts a string containing the name of the VI that you want to reference or a path to the VI that you want to reference. If you wire a name string, the string must match the full delimited name of a VI in memory on that target. If you wire a path, LabVIEW searches for a VI in memory that you previously loaded from that path on the same target. If a matching VI is not found in memory, LabVIEW then tries to load the VI from that file on disk. An error occurs if LabVIEW cannot find the file or if the file conflicts with another VI in memory. |
If the path is relative, the VI interprets the path as relative to the caller VI or to the application directory, if the caller VI is not saved.
|options determines characteristics of the VI referenced by vi reference, including whether you can call the VI asynchronously. The default is 0x0. Create options by combining a subset of the following option flags. |
|error in describes error conditions that occur before this node runs. This input provides standard error in functionality.|
|password is the password for the VI whose reference you want to open. Wire a password to this input if you want to edit a password-protected target VI. If you wire the correct password, the function returns an authenticated reference to the VI. If you wire an incorrect password to this input, the function returns an error and an invalid VI reference. LabVIEW ignores this input if the target VI is not password-protected. If you do not wire a password to this input and the target VI is password-protected, the Open VI Reference function returns a valid reference, but you cannot use the reference to edit the VI. |
|vi reference is the refnum associated with the requested VI. If the function fails, vi reference contains Not A Refnum.|
|error out contains error information. This output provides standard error out functionality.|
The Open VI Reference function prepares a VI reference for dynamic calls by the Call By Reference node, the Start Asynchronous Call node, and the Wait On Asynchronous Call node. Use the type specifier VI Refnum (for type only) and the options inputs to prepare a reference for dynamic execution.
If you want to call the specified VI dynamically with the Call By Reference Node or the Start Asynchronous Call Node, you must use appropriate data for the following parameters:
If you wire a strictly typed VI reference to the type specifier VI Refnum (for type only), the VI specified by vi path must meet the following criteria:
You can abort all open VI references either manually from the front panel of the VI or by using the Abort VI method. However, VI references prepared for asynchronous execution have important caveats depending on the options used to open the reference:
After you finish using a reference that you obtain with this function, close the reference with the Close Reference function. Explicitly closing a reference enables LabVIEW to free the resources involved in maintaining that reference, thereby contributing to optimal memory allocation and performance. Otherwise, LabVIEW cannot close the reference until the VI that opened the reference finishes executing.
|Note Closing a reference that was opened with the 0x80 option flag does not abort the referenced VI.|
If you want to dynamically open a VI on both the development computer and within a stand-alone application, use a relative path for vi path.
Refer to the following VIs for examples of using the Open VI Reference function: