LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you call by reference to a VI inside a PPL?

Solved!
Go to solution

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 

0 Kudos
Message 1 of 2
(3,424 Views)
Solution
Accepted by topic author DuncanW

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)

Message 2 of 2
(3,405 Views)