LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open a vi from a LV application in edit mode

Hello,
I built an application with LV7.1, this LV application must open external VIs (not included in the application) in edit mode. My problem is that the application opens the front panel of the desired VI but I can't open its block diagram.  In the application I open the external VI as shown in the attachment.
 
Regards
Neona  
0 Kudos
Message 1 of 5
(2,549 Views)

"neona" <x@no.email> wrote in message news:1175865006915-503413@exchange.ni.com...
Hello,
I&nbsp;built an application with LV7.1, this&nbsp;LV application&nbsp;must open external VIs (not included in the application) in edit mode. My problem is that the application opens the front panel of the desired&nbsp;VI but&nbsp;I can't open its block diagram.&nbsp;&nbsp;In the application I open the external VI&nbsp;as shown in the attachment.
&nbsp;
Regards
Neona&nbsp;&nbsp;



Open VI.vi:
http://forums.ni.com/attachments/ni/170/240167/1/Open VI.vi



If you open a vi reference, the vi is openen in the instance of the executable. When you use the development environment, the vi is open in labview.exe, so you can edit it. When you open the reference in an exe, the vi is opened in that exe's run time engine, so you can't edit it.


Perhaps if you open an application reference, and open the vi with that reference, you can open it in the development environment, with the run time.


You can also use the "System Exec.vi": "<path to labview.exe> "<path to vi>\vi to open.vi". This will open LabVIEW if it's not open, and open the vi in it.


Needless to say: you can never open a vi in edit mode, if you didn't install LabVIEW!


Regards,


Wiebe.
0 Kudos
Message 2 of 5
(2,537 Views)
If you're opening your VI from within your applicaiton then your VI is being opened within the run-time environment, hence no block diagram. You need to launch it within the development environment by, for example, using System Exec to launch LabVIEW and pass it the name of your VI as an argument so it opens the VI in the development environment.


Sorry for the double-answer. Posted at the same time as previous answer.

Message Edited by smercurio_fc on 04-06-2007 08:42 AM

0 Kudos
Message 3 of 5
(2,538 Views)

Ok, now it's clear. Many thanks.

Regards

Neona

0 Kudos
Message 4 of 5
(2,533 Views)
If you want to use VI server to open a VI in LV programmatically from your application you'll need to make sure to open the application reference correctly. I had exactly the same task to do some months ago. To open a reference to LabVIEW you'll need to pass your computer's IP address or computer name to the "machine name" input of the open application reference function. If you wire localhost or leave it empty it'll return a reference to the application (no matter what port you specify). See this thread.
To use VI server LabVIEW must be running (and VI server must be enabled in the options). You can run LV via system exec.

Daniel

0 Kudos
Message 5 of 5
(2,521 Views)