08-03-2009 06:18 AM
How to open a reference to LV Application from a LV executable?
I need this reference to pass into the "Context for BuildIn" input in the VI "..\National Instruments\LabVIEW 8.6\vi.lib\AppBuilder\ABAPI Get Dependencies and Settings.vi"
08-03-2009 09:05 AM
Hi Saranbalu
You open a application reference via the "Open Application Reference.vi", you can find it under Application Control in the functions palette. Just a word of caution though. The VI you are trying to use is a protected VI and has very little documentation so be carefull when using it. If you are trying to build a executable programatically I recommend using the BuildTargetBuildSpecification.vi instead.
Best Regards
David
NISW
08-03-2009 11:11 AM
Hi David,
Thanks for your suggestion. I know about the Open Application Reference VI. In the development environment, it gives out the LV reference. But in an executable, though it gives a reference, if I access the App.Directory Path property for that reference, it gives the path of the LV executable and not LV.exe's path.
Also, I am not building an application programmatically but only trying to get the dependencies of particular VIs.
Thanks,
Saranya
08-04-2009 02:32 AM
Hi Saranbalu
Ok, then have a look at this thread. It deals with getting the dependencies for a VI, but it should be appliacable to an executable too (if the call is made from inside the same executable that is). Use an Open Application Reference.vi to get a reference to your application, then an Open VI Reference.vi to get a reference to the VI in the application you need the dependencies for.
Best Regards
David
08-04-2009 03:18 AM
Hi David,
Get Dependencies and Settings VI from Application Builder will include not just VI dependencies but also the non VI files - like .rc files. I need these non VI files also for my application. So I cannot just use the callees to get the dependencies.
Thanks,
Saranya
08-04-2009 04:26 AM
Hi Saranya
I have a small thought, it's a bit of topic but what I'm wondering is why you want to build your VI into an application? Calling the get dependencies VI looks like it is only possible on a computer with the development enviroment installed (if it's not installed there is no LabVIEW to reference, right?) so why not keep it as a VI? I'm still look into how to get the reference, but you'll still need the development enviroment
Best Regards
David
08-04-2009 04:51 AM
Hi David,
I am ok with the condition of having the LV development environment. What I am trying to actually do is to create a source distribution programmatically but not through an lvproject. We are providing the user with a simple utility (tailor made to our requirements) to create this distribution and that's where "Get Dependencies VI" comes in.
I tried a few more things. If you wire "localhost" to the machine name input of "Open Application reference.vi" and enable the VI server in Tools >> Options, you can get the LV application reference in LV executable. This imposes a condition that LV has to be open while I run my distribution utility exe. Is there a simple way to get the LV app reference than this?
Thanks,
Saranya
08-04-2009 07:35 AM
Hi Saranya
So far I've just found the same way you have. Will try and work around it.
Best Regards
David