LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

open reference to LV

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"

0 Kudos
Message 1 of 8
(2,586 Views)

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

0 Kudos
Message 2 of 8
(2,563 Views)

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

0 Kudos
Message 3 of 8
(2,548 Views)

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

0 Kudos
Message 4 of 8
(2,533 Views)

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

0 Kudos
Message 5 of 8
(2,528 Views)

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

0 Kudos
Message 6 of 8
(2,516 Views)

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

0 Kudos
Message 7 of 8
(2,512 Views)

Hi Saranya

 

So far I've just found the same way you have. Will try and work around it.

 

Best Regards

David

0 Kudos
Message 8 of 8
(2,499 Views)