LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open Front Panel of subvi which is called by reference in EXE

Solved!
Go to solution

I want to open the Front Panel of a subvi when it is called. This subvi will open the Front Panel of a third level subVI. Then I want to get back to the main.vi the output of the subVIs.
I can do that successfully in the Development Environment.
I call the VIs by reference asynchornously. So the VIs load when they are called and the caller VI waits for the output of the sub-vi.

I attach the screenshot of the Window Customize properties of the subVIs.

 

When I build the application, the executable cannot open the Front Panel of the subVI, even if the paths of the subVIs are relative.

I also put the subVIs in the "Always Included" field of the build properties and the "Remove Front Panel" check box is not selected.

I attach the project and the screenshots of the settings.

 

0 Kudos
Message 1 of 4
(3,246 Views)

Executables have 1 path level difference to development environment (the exe is considered a folder), do you handle that?

It might be that the compiler optimize away the front panel of your VI as it does with pure subvi's. To force it into memory you can drop a This VI ref in the VI to force it to keep the front panel.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 4
(3,176 Views)

I strip the path twice if the path consists of an exe. Here is the corresponding snippet:

 stripPath_dev-exe.png

 

I tried to drop a "This VI" ref in the block diagram, but it doesn't change anything.

I removed also the SSE optimization, but it does not solve the problem.

0 Kudos
Message 3 of 4
(3,148 Views)
Solution
Accepted by topic author nikosfs

If you had used error dialogs, you would have seen the paths to the VIs you are building are not valid.  The VIs are still being included into the EXE, so you don't need to do any special stripping of the EXE VI path.  Wire a false to your case structure determining the path, and it will work fine.

 

You only need to double strip the path if you are trying to get to the directory the EXE is in.

Message 4 of 4
(3,120 Views)