LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with building an application

Hello,

 

i wrote a GUI in LabVIEW 2010 SP1 and im having some troubles.

In one part of the program I'm using command line interface.

This part of my GUI works like this:

I use

cmd /c "relative-path"\Messdaten\test.exe

with Labviews System Exec.vi

I get the relative path with labviews function Current VI's Path.

So this all works fine when running the VI in Labview. When i copy my VI to other directory an PC this also works fine like it should.

 

But when I build my Application with the project function, this part of the GUI doesn't work anymore. The button which is should start the commandline command doesn't do anything.

 

I copied the required file to the path where the exe is located.

So when my Application is in

C:\testfolder

my test.exe

is in folder

C:\testfolder\Messdaten\

 

So why does he not call test.exe?

 

Thanks for Help!

Stefan

0 Kudos
Message 1 of 2
(2,166 Views)

This question has been asked many times. When you build an exe, the relative path is different. Instead of \folder\example.vi, you get \folder\example.exe\example.vi so you need to do an extra strip path. You can add an Application.Kind property to you code to determine whether you are in the development or tun-time environment.

Message 2 of 2
(2,163 Views)