11-22-2010 12:05 PM
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.
Solved! Go to Solution.
11-23-2010 10:57 AM
What is it you mean by file specification? can you elaborate more on that and why you would need it?
11-23-2010 11:11 AM
Maybe these will give you what you are looking for.
http://zone.ni.com/reference/en-XX/help/371361E-01/glang/current_vis_path/
http://digital.ni.com/public.nsf/websearch/FD7DE8BC8FFC256C862565F4006BE363?OpenDocument
http://digital.ni.com/public.nsf/allkb/EEE8A5650DAC28558625762F0070A384
11-23-2010 12:34 PM
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
11-23-2010 12:53 PM
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.
11-23-2010 01:01 PM
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
11-23-2010 01:06 PM
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
11-23-2010 01:14 PM
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.
11-23-2010 01:21 PM
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
11-23-2010 01:37 PM
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