Polymorphic VI: Difference between revisions
m →Limitations: changed "connector pattern" link to "Connector Pane" |
m →Limitations: made limitation more exact |
||
Line 28: | Line 28: | ||
==Limitations== | ==Limitations== | ||
*All VIs of a polymorphic VI | *All VIs of a polymorphic VI must have the same [[Connector Pane]] pattern, or the Polymorphic VI will be broken. | ||
*Using the polymorphic VI will load all VIs into memory. | *Using the polymorphic VI will load all VIs into memory. |
Revision as of 23:03, 18 December 2008
Polymorphic VI
A polymorphic VI is a VI without any code but can be used to group several normal VIs into one VI. A developer can choose during edit mode which VI should be executed during runtime.
Usage
A polymorphic VI is used to execute the same operation on different file-types or to return different file types
Selection
Selection of a specific VI can be done automatically based on the data-types connected to the in/output terminals of the VI. To show the manual selector, right-click the polymorphic VI icon an a block diagram, select 'Visible Items\Polymorphic VI Selector'
Configuration
The configuration of a polymorphic VI is done by selecting 'Open Polymorphic VI' after a right click on the icon on a block diagram.
In the configuration dialog you can edit the Polymorphic VI, add or remove VIs. Alternatively it is possible to show the icon of the instance instead of the icon of the polymorphic VI. It is possible to let the selection be done automatically. The selector can be shown by default.
Configuration of an instance
By using the 'Edit name...' button on the configuration dialog the following dialog opens:
The 'Menu Name' is shown in the selector after an instance is selected. The 'Polymorphic VI Selector Name' you can alter the menu shown by the VI selector. Levels can be made by using a colon (:) as separator.
Limitations
- All VIs of a polymorphic VI must have the same Connector Pane pattern, or the Polymorphic VI will be broken.
- Using the polymorphic VI will load all VIs into memory.