 | In This Topic |  |
|
Obtaining a VI Reference
Requires: VI Scripting
To use VI Scripting to inspect, modify, or create VIs and VI objects, you must usually begin by obtaining a reference to the target VI with which you want to interact. You then can use the reference to obtain references to objects within the target VI or to add new objects to the target VI.
Refer to the following table to identify the best way to obtain a VI reference for your specific use case.
Caveats and Recommendations
- Create complicated new VIs from a template when possible—While you can create a new VI programmatically by creating each individual component object one at a time, it is much easier to create a new VI from a template and then modify small sections of the code.
- Displaying the target VI is optional—You do not have to display the front panel or block diagram of a target VI in order to inspect or edit the VI programmatically. However, you can use the following properties and methods to display different parts of the target VI:
- Close all references that you open—An excessive number of open references negatively impacts the performance of a VI. Read about closing VI and object references for more performance details.