04-24-2006 11:10 PM
04-25-2006 12:40 AM
04-25-2006 04:26 PM
If you have the Internet Toolkit, you can take this process one step further and automatically parse the Library file in search of the correct VI reference. Project Library files have .lvlib extensions, but they are actually just XML text files. As such you could parse through them using the XML functions in the Internet Toolkit.
The basic idea would be to get an array of references to all nodes with the tag "Item." This will correspond to the Children[ ] array output by a Library property node. You can then parse through this array of nodes in search of nodes whose "Type" is "VI". The basic idea here is to output this data, so when you search for a particular VI in the library, you can output the correct item index. It gets a little more complicated if the VIs are embedded within virtual folders in the Project Library.
This will solve the problem of calling VIs dynamically using only Library references. This technique just helps you figure out which reference in the library is which. Which are VIs? Which are documents or shared variables? Of the VI references that are there, what are the paths or names of the VIs? And so on... All of this can be extracted programmatically during run-time from the library file itself.
04-26-2006 11:35 AM