Showing results for 
Search instead for 
Did you mean: 

Path to Executable from Dynamically called VIs

QUESTION: How can I retrieve the path to an executable that is called from a VI that was created by dynamically loading a VI template?
The application is a bit too complicated to post, so I will try to describe...
I have a built executable. It dynamically calls VITs that are insides LLBs and executes them. Because they are dynamically called from a VIT, the VI loaded into memory this way is only a copy of the VIT on disk - there is no path information to the loaded VI. This all works fine.
I would like to programmatically get a path to the calling executable from within one of these dynamically called VIs (or one of their subVIs). I have so far been unsuccessful.
  • Call Chain only gives the names of the callers. I couldnt' find a way to get the path info to the EXE from just the name.
  • The VI property "Caller's Paths" gives me an empty array of paths
Constant paths are unacceptable - I need these modules to figure out the absolute path to data support folders of the calling executable. Not only will they be called by different executables at different times, any one of those executables may be in a different locatin depending on how/where it's deployed, i.e., all over the danged place!
Any answer is appreciated, even if it's "no way, not going to happen" Smiley Sad
Thanks in advance!
0 Kudos
Message 1 of 7
Couldn't you get the path of the executable from within the executable, and pass the path reference to the dynamically called VI when it calls that VI either through the connector panel or by using VI server to set the value of a control in the dynamically called VI right after the VI gets called?
0 Kudos
Message 2 of 7
I really haven't played with VIT's at all, but this is one solution I would suggest for a generic dynamically called vi. Create a path control on the front panel of the called vi (the VIT's). Before running (or after depending what happens when it runs) pass the value of the Current VI Path from the calling vi to the called vi by using the set control value method on the vi reference of the called vi. Once you've got it there, do whatever you want with it.

0 Kudos
Message 3 of 7
You need two application properties:

Application.Directory Path and Application.Name

Together they will form the total path of the calling executable

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 4 of 7

Getting the data within the calling exe and passing in the data is an easy workaround if it weren't for the problem that executables and interfaces to the modules are already defined/built/deployed. New modules that I am creating now already have a defined interface that doesn't include any specific place for information about the caller. I am trying to avoid having these other executables edited and rebuilt and re-validated.

What I am looking for is the ability to determine path information about the caller from the callee alone, with no other information passed in.



0 Kudos
Message 5 of 7



Your solution is the one - THANKS  1E6  !!!



0 Kudos
Message 6 of 7

I need to read this tonight...

0 Kudos
Message 7 of 7