LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I determine VI file specification in Executable?

Solved!
Go to solution

Under LabVIEW 2010, how do I determine a VIs complete file specification as it resides in a built executable?  I have the executable's file location and I have the VIs location on disk when the executable was built.  I am hoping there is a LabVIEW property that will tell me the specifications for each file in the executable.

0 Kudos
Message 1 of 38
(4,591 Views)

What is it you mean by file specification? can you elaborate more on that and why you would need it?

National Instruments
Applications Engineer
0 Kudos
Message 2 of 38
(4,559 Views)

Thanks for the links.  I had forgotten the Current VIs Directory icon could be used to determine VI path within executable.

 

My problem remains that I need a programmatic technique for determining the VI path within executable given the VI's build-time source location and the executables current location.


Thanks again.

 

WB

0 Kudos
Message 4 of 38
(4,540 Views)

 


wwwbrown wrote: 

My problem remains that I need a programmatic technique for determining the VI path within executable given the VI's build-time source location and the executables current location.


I don't understand what you are trying to get at. What does the build-time source location have to do with where the VI is within the executable? Once it's in the executable it's in the executable. It's irrelevant where the build-time source location was.

 

0 Kudos
Message 5 of 38
(4,534 Views)

 


My problem remains that I need a programmatic technique for determining the VI path within executable given the VI's build-time source location and the executables current location.


 

If I understand you correctly, try opening a reference to the current VI and use the property node to get the VI path.  Not sure what this will give you in a LV 8+ build, but in a LV 7 you will get the path of the VI to the executable then to the VI.  Whether this will show sub directories off the executable is unclear as I have not use above LV 7.

 

Hope this helps,

 

 

A

0 Kudos
Message 6 of 38
(4,533 Views)

Its location in the executable is a function of its build-time source location.

 

My application uses VI plug-ins.  The plug-in to use for an implementation is read from a configuration file at run-time.  All possible plug-ins have been built into the executable.  I want to call the plug-in by reference which of course requires a strict typedef VI reference.  To get a strict typedef reference I need to provide a file path to the Open VI Reference icon (provided the VI is not in memory which it is not).  In my case, the path is to one of many possible plug-in VIs built into my executable.  I am trying to avoid holding a hard-coded map of every plug-in VI versus its location in the executable.

 

Therefore, I need an algorithm for determining a VIs path in an executable "on the fly."  I know this is possible because NI does it when they create the executable.  Under LV 8.6, it was trivial to calculate this path (just add the VI name to the executable file specification).  I need a technique for LV 2009-2010.

 

Thanks for looking at this.

 

WB

0 Kudos
Message 7 of 38
(4,525 Views)

This is a great idea, but unfortunately the path in the executable is not returned by the VI path property when running out of an executable.

0 Kudos
Message 8 of 38
(4,526 Views)

The issue of VI paths in executables has been asked many times before. Did you try a search? For example: http://digital.ni.com/public.nsf/allkb/EEE8A5650DAC28558625762F0070A384

0 Kudos
Message 9 of 38
(4,513 Views)

I have read every link available.  Apparently I am missing something.

 

A: I have source at: C:\DYNAMITE.2010\Core\Applications\Power Supply\Plug-Ins\AGN6700\Initialize.VI

B: I build to EXE at: C:\DYNAMITE.2010\Core\Applications\Power Supply\Public\Build\Example.exe

 

C: LV reports VI in executable at: C:\DYNAMITE.2010\Core\Applications\Power Supply\Public\Build\Example.exe\Applications\Power Supply\Plug-Ins\AGN6700\Initialize.VI

 

How do I get C from A and B.  I need to provide C to the Open VI Reference icon to get a valid strict typedef VI reference.


WB

0 Kudos
Message 10 of 38
(4,501 Views)