cancel
Showing results for 
Search instead for 
Did you mean: 

Create exe with some vi files

SOLVED
Darkhan
Member
Solved!

Create exe with some vi files

Message contains an attachment

Hello,

 

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.

 

 

15 REPLIES 15
James_W
Active Participant

Re: Create exe with some vi files

Hi Darkhan

 

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.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Darkhan
Member

Re: Create exe with some vi files

Message contains an attachment

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. 

Norbert_B
Proven Zealot

Re: Create exe with some vi files

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).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
crossrulz
Knight of NI
Solution

Re: Create exe with some vi files

Message contains an image Message contains an attachment

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.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
James_W
Active Participant

Re: Create exe with some vi files

Hi Darhan,

 

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!

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Darkhan
Member

Re: Create exe with some vi files

Thank you very much!!!!

I've got it!

Darkhan
Member

Re: Create exe with some vi files

Hi! 

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.
Thank you!

Darkhan
Member

Re: Create exe with some vi files

Message contains an attachment

screen

Norbert_B
Proven Zealot

Re: Create exe with some vi files

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.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.