03-03-2014 05:45 AM
I am using LabVIEW 2010
I am trying to build a "Main.vi" into an exe, in which this Main.vi needs to dynamically call two vi "1.vi" and "2.vi". I have put into "always included" before building the exe. But after creating exe "1.vi" and "2.vi" don't run.
Solved! Go to Solution.
03-03-2014 06:13 AM
If you are using dynamic calling, you need to ensure you get the correct path:
your path is probably broken/incorrect in the EXE.
use the "Application Path" to specify the path to the VI in your project in the development environment, then it sould work in the runtime environment!
(Path constant found on File I/O > File Constants Pallette)
Should work for all LabVIEW from 2009 onwards if I remember correctly.
03-03-2014 06:38 AM
Thank you for the answer and I apologize for my English. My LabVIEW program work correctly. I have 2 vi: Monitoring.vi and Monitoring_of air.vi, when in labview I click button of monitoring will open Monitoring_of air.vi. But when I have created exe file only open start vi. Monitoring_of air.vi is ignored.
03-03-2014 06:51 AM
Your paths are absolute and point to a static location outside the EXE.
Inside the EXE, you should navigate using "Current VI Path" and strip the VI name, then add the sub-vi name (and path, depending on the EXE setup).
03-03-2014 07:47 AM - edited 03-03-2014 07:48 AM
Just to show what Norbert is saying. You should get in the habit of using relative paths. They will save you a lot of headaches down the road, especially if you are dynamically calling VIs inside of EXEs.
03-03-2014 07:51 AM
If you build up from the Applcation path you should be fine.. I rather suspect that the application path is "D:\monitoring2" in this case anyway.
(Look at the detail help to see how the application path is working.)
If you can get it working with the application path as a relative path in the development environment, your runtime should not crash!
03-03-2014 07:58 AM
Thank you very much!!!!
I've got it!
03-06-2014 12:14 PM
I have created exe file, but open button of my report (Word) don't work. I used "Current VI Path". In labview this button is working.
03-06-2014 12:15 PM
03-07-2014 01:42 AM
If moving outside of the EXE, you should use "Application Directory" instead of Current VI Path. This ensures that you leave the EXE without the need to track "Strip Path" on your own.