Converting a Standard VI into a Polymorphic VI with Multiple Instances

Follow the seo services steps below to extend a Library VI into a Polymorphic VI. This will be done in the case where inputs as different data-types are required for the Library VI, and they can be logically grouped using a Polymorphic API. The benefit of this process is that no calling code is affected, but is inherently updated and relinked to the Polymorphic VI automatically (e.g. VI Tree, Palettes, Application Code etc...).

Note: Renaming and moving code is best done by interacting with the Repository directly. In this example we will create a Polymorphic VI for the Compare Two Paths Library VI in the OpenG File Tools library folder. Additionally only a single step should be performed each time to avoid any issues with SVN.

Open up the Repo Browser. If using TortoiseSVN on Windows then right click anywhere and select TortoiseSVN >> Repo-browser...



Create a New Folder by right clicking the library folder and selecting Create Folder.... Use the name of the Library VI. E.g. Compare Two Paths.



Move the Library VI into the New Folder by dragging and dropping it. E.g. Move Compare Two Paths.vi from library into library\Compare Two Paths folder.



Rename the Library VI using the syntax %Library VI Name% - Input Type (where Input Type is logical for that VI). E.g. Rename Compare Two Paths.vi to Compare Two Paths - Scalar.vi.



Create the Polymorphic VI in the same location and with the same name as the original Library VI to preserve linking.

If the Polymorphic VI is going to have a lot of instances, use a good menu layout for the instances, an easy tool for editing those is the Polymorphic VI Editor.

Create new Library VIs that will become the Polymorphic VI instances and add them to the Polymorphic VI.



Open any original Test(s) files and relink to the original Library VI. Create additional tests for any new Library VIs.



Commit changes.