02-22-2012 09:53 AM
Hi,
I want to dynamically call a VI, but don't want to wait for all the child VI's dependencies to load each time, so I've compiled the VI inside a Packed Project Library (PPL).
I am opening a reference to the VI by file path using a strict data type, then calling the VI using the Call by Reference node. This works with a VI, but I cannot see how to specify a file path to the VI inside the PPL. Is this possible?
Many thanks
Duncan
Solved! Go to Solution.
02-23-2012 08:19 AM
Thanks to Oli at NI (UK) the solution to this is as follows.
In the 'Advanced File Functions' palette, there is a 'Packed Library' palette, which contains the 'Get Exported File List' VI.
This takes a file path to the compiled packed library and returns an array of paths to the individual VIs inside it.
When I index that array and pass the path to the 'Open VI Reference' VI, my child VI executes successfully.
Looking at the exported path, the reason for the problem becomes clear...
I was passing <CompiledLibraryPath>\<VI Name> (i.e. C:\Projects\TestProj\Build\libTest.lvlibp\TestSubVi.vi)
The path returned from the 'Get Exported File List' VI contains the relative path of the subvi where it was located when the compile took place
(i.e. C:\Projects\TestProj\Build\libTest.lvlibp\TestProj\LabVIEW\TestSubVi.vi)