From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem building exe

Solved!
Go to solution

Hi!

 

I have two projects, for one, I built an exe and it is running great. In the second project, in one of the several Vi's that I have, I call in the code the exe I had created before and if I run the program everything is fine. Then, I built an exe for my second project (the one that includes my first exe), and the problem comes when I run it, all looks good until I reach that part of the program that calls the first exe, it just doesn't load it.

 

I hope you understand what I mean.Here is how I call my first exe of my first project.Here is how I call my first exe of my first project.

 

0 Kudos
Message 1 of 4
(2,745 Views)

Without knowing anything else, the obvious guess is that your path is wrong. Put a string indicator on the string to path output so you can see what path is being generated at run time.

0 Kudos
Message 2 of 4
(2,714 Views)
Solution
Accepted by topic author paco09

Hi Paco,

 

It is important to understand what the "application directory" gives you when you call it from different application types. This is from the help file:

"Application Directory VI

Returns the path to the directory containing the application.

If you call this VI from a stand-alone application, this VI returns the path to the folder containing the stand-alone application.

If you call this VI from the development environment and the VI is loaded in a LabVIEW project file (.lvproj), this VI returns the path to the folder containing the project file. If the project is not saved, this VI returns <Not a Path>."

 

The way you are calling it, on your disk your files should look like this:

  • Folder 1
    • Executable1.exe
    • Ejecutable ADQ
      • AdqSiaEpi.exe

Message 3 of 4
(2,706 Views)

Thank you! The problem was that the AdqSiaEpi.exe file was not in the correct folder.

 

 

0 Kudos
Message 4 of 4
(2,688 Views)