02-20-2015 09:05 AM
as the linked page says:
Yes, this function does work for LLBs and only for LabVIEW executables built using LabVIEW 8.0 and lower.
I'm using Labview 2014 so the function is not working 😞
I tried with the .exe file and i cannot list anything (just to be sure i tried with some path combinations like file.exe/myllb.llb or file.exe/includedvi.vi )
02-20-2015 09:24 AM
When you build your exe, to troubleshoot only, try checking or adding llb to always include file for the exe build. If it works, you know that LV cannot open/find/map llb.
02-20-2015 09:31 AM
uhmm not that easy.. in order to add the llb to the "always include" section, the llb is supposed to be part of the project. unfortunately when i try to insert the llb it automatically opens it and asks me to choose which file to add (or i can add them to the project inside a folder)..
02-20-2015 10:07 AM
@cassaniti wrote:
uhmm not that easy.. in order to add the llb to the "always include" section, the llb is supposed to be part of the project. unfortunately when i try to insert the llb it automatically opens it and asks me to choose which file to add (or i can add them to the project inside a folder)..
Well I wonder if that your problem, the llb is not part of the project? As a trouble shoot manual add just the VI to "always include" see what happens, find out if the file not part of project because llb is not part of project.
Rich J
02-20-2015 10:09 AM
The VIs are already included, what i do not know is the path of the VIs once the exe is compiled...
02-20-2015 12:21 PM - edited 02-20-2015 12:34 PM
The way you build the path is likely incorrect. Before you build exe the path name is (WorkingDir)\Anw.Name.vi\... after the build maybe your VI name is an exe (you named in the build) say its TopRunVI.exe. Now way to navigate to an exe path. In fact I'm uncertain how your path works because its in some other language.
Let me add...
Remove the VI name property in your path then recompile exe.
Also try adding your llb as a folder not file (but you've done this already).
02-23-2015 03:00 AM
It's weird.. i thought what I've been doing with Dynamic VI Load and "Always include VIs" was kind of a standard but it seems like it's not... I try to be more exaustive with the information I have:
The MainVI and the LLB (with all the VIs that i want to load) are both in D:\LabVIEW Data\com_lv_sequenzer\trunk
In my project file I added the whole LLB as a folder (named Sequenzer_Functions) which includes all the VIs that i want to dynamically load
When i compile the MainVI i select each single VI that i want to dynamically load from the Sequenzer_Functions project folder and I add it to the "always include" list.
I run my exe and I want to dynamically load one of the Vis but i cannot locate their path 😞
03-30-2015 05:41 AM
Hi people! After a few busy week i finally had time to create a small playground that I can share with you and that reproduces exactly the situation.
I am attaching a zip file with the Labview source code, which includes an LLB with two VIs (Sum.vi and Substract.vi), a Main.vi that calls dynamically one of the two VI according to the Enumerate selection and a LabviewProject file which includes the Main.vi and the two VIs inside a folder (created through right click-add-Data and by choosing the LLB file. The executable in the project is configured in order to include the files Sub.vi and Substract.vi
The Labview Environment mode runs flawless, while the compiled version is not working because the path is wrong. I tried the following combinations without success:
C:\..\DynamicLoad.exe\MyLLB\Sum.vi
C:\..\DynamicLoad.exe\Sum.vi
C:\..\DynamicLoad.exe\MyLLB.llb\Sum.vi
And I'm running out of ideas... I really hope you will be able to help me because this is driving me crazy!
03-30-2015 12:01 PM - edited 03-30-2015 12:07 PM
I see that you did not enable debugging on the executable, this allow you to debug the executable and not developement code. Open your Main build properties, under Advanced tab, select Enable Debugging. OPen/Run the exe, leave its FP open, go back to development FP under menu Operate\Debug Application or Shared Library to start debugging exe.
(I would put a break on Open Ref VI cus VI will error at input wire). Probe the path.
On second thought, go to the build properties, click Preview, Generate Preview. It shows you the path where the files are going but less detailed.
After doing above immediately, files Sum.vi should go here to run, in a folder "builds\DynamicLoad\Main\DynamicLoad.exe\Sum.vi. But here's the catch, your using the Call By Reference Node (do Help) that takes only Strictly Typed Refnums (not compiled code). So to use it you can manually put the VI in the same folder as exe or use the Open VI Reference which is compiled code.
Rich J
Edit: because its a compiled exe, you can't library in same folder to make it work...
03-30-2015 12:43 PM - edited 03-30-2015 12:44 PM
Why are you not using the Current VI's Path function and build from there? You should really only use the Application Directory for external files (like configuration files).
This code worked for me in both the development environment and the executable.