LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

are dynamically linked vi's called by their vi name or panel name?

I have built an executable and linked in the dynamic vi's (lv6). Now I'm having a problem calling the type def'd dynamic VI's. If I have changed the dynamic VI's panel name under properties, does this affect the method I should be calling the VI's?
0 Kudos
Message 1 of 5
(2,931 Views)
The panel name does not change how you call a dynamic VI. However, the pathname dose change when you build your EXE. Make sure you are using either an absolute path to where you know your VI will be, or use the "Current VI's Path" function to get you your path inside the EXE.

Also, if you have a dynamic VI included in your EXE, make sure that the app builder is not removing its front panel!

Daniel L. Press
www.primetest.com
0 Kudos
Message 2 of 5
(2,931 Views)
Your answer implies that I would need to maintain a directory of my "plugins" or dynamic VI's. What is the value of linking the dynamic VI's at build time if they are not included within the executable?
0 Kudos
Message 3 of 5
(2,931 Views)
I did not mean to imply that. You can and should include your dynamic VIs in the executable. But, when you do, you must relaize that they will then be found inside the executable. You must make sure that your code is going to open the reference to your dynamic VIs using the proper path. The VI Name does not suffice since dynamic VIs are not necessarily loaded into memory. You must specify a full path. I usually do that by using the "Current VI's Path" function and stripping the name off, then building the name of the dynamic VI. The app builder will put all of your VIs (dynamic or otherwise) in the same "folder". I put folder in quotes, since it looks more like an LLB. The pathname of a VI in your C:\Source folder that gets included in
an executable is now in the C:\Source\Build\My Executable.exe\... "folder".

Now, there are cases where you want your dynamic VIs outside the executable. Say you have two different deployment platforms. One with Office XP and one with 2000. You'll need different VIs to automate the different versions of Office with ActiveX. You may want one executable that can do both, but you will need to select different dynamic VIs for each version. ... just one example.

Enjoy,

Daniel L. Press
www.primetest.com
0 Kudos
Message 4 of 5
(2,931 Views)
I just to make some clarifications about dynamic VIs paths and executable.

When a VI reference is opened in an executable (path input), it is first looked if a VI with the same name is already loaded in memory. If none is found, the executable internal LLB is looked into for a VI with the same name. If one is found, the actual path is ignored and this internal VI is opened. If none is found in the internal LLB, then a VI is searched at the absolute path.

As long as you check the VI as dynamic when building the application, you don't have to care about the actual path since it will always be stored in the internal LLB and found when referenced. You can let the path you use on your system during development.

Photon Dan has a
lready pointed out, the application builder removes by default the panel of dynamic VIs which will causes errors when front panel resources are actually needed during execution. This is likely your problem if you did include the VIs as dynamic. If you didn't then the VI must exist at the absolute path wired on the input of the Open node.


LabVIEW, C'est LabVIEW

0 Kudos
Message 5 of 5
(2,931 Views)