LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert an "exe" inside of a VI

Solved!
Go to solution

Good morning everyone,


I would like to know if there is any way to launch an exe (created with labview too) to execute within a * vi in a particular zone, not to open independently but in a particular area of the main front panel.

Thanks for your help.
0 Kudos
Message 1 of 9
(4,318 Views)

i don't know about the .exe, others may have that information, although i suspect this will not work.

 

do you have access to the original VI for the exe?

then you could have it in a SubPanel.


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Message 2 of 9
(4,314 Views)

You could try using the System Exec VI or you could use the Open Vi Reference and feed/receive the data that you want connected using the properties or methods from the executable.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 3 of 9
(4,288 Views)

@Gabrielo wrote:
I would like to know if there is any way to launch an exe (created with labview too) to execute within a * vi in a particular zone, not to open independently but in a particular area of the main front panel.

This sound more like you should be using a Packed Project Library (PPL) for your "exe" and then have your main code dynamically call the VI in the PPL and load the front panel into a subpanel.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 9
(4,259 Views)

The idea is to work directly on an exe or dll and not on a "vi" because I would like that EXE to function as an external plugging.


I have tried using the System Exec vi and it opens the EXE but I would like this exe to embed it in a part of the main program.

thanks to all.
0 Kudos
Message 5 of 9
(4,241 Views)

Sure you can do this.  Here is an example where I embedd 7-zip into a VI as a string constant.  Then on running the VI it is saved to a temp location and ran.

 

https://lavag.org/topic/16513-can-we-prevent-zlib-compress-dir-from-replacing-accented-characters/?d...

 

Similar things could be done to encapsulate other binaries like DLLs too.

Message 6 of 9
(4,238 Views)

@Gabrielo wrote:

The idea is to work directly on an exe or dll and not on a "vi" because I would like that EXE to function as an external plugging.


That is exactly the use case for a PPL.  A PPL is a compiled library.  So it is equivalent to a DLL, but you have the public VIs to interface with however you need to.  If you need to update your plugin, you just update the PPL.  Need a different functionality, just point to a different PPL.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 9
(4,226 Views)

crossrulz escribió:

@Gabrielo wrote:

The idea is to work directly on an exe or dll and not on a "vi" because I would like that EXE to function as an external plugging.


That is exactly the use case for a PPL.  A PPL is a compiled library.  So it is equivalent to a DLL, but you have the public VIs to interface with however you need to.  If you need to update your plugin, you just update the PPL.  Need a different functionality, just point to a different PPL.

Thanks Crossrulz for your response. I have never used a PPL library, it could guide me in how to generate it and how to make a call from it in the main program so that I select within a VI zone to run this PPL.

Thanks in advance.
0 Kudos
Message 8 of 9
(4,181 Views)
Solution
Accepted by topic author Gabrielo

For a PPL, you just make a project specifically for the plugin.  You have to use a library (lvlib) for your plugin code.  Then you just create a Packed Project Library build specification.

 

To use in your main project, you can just put the built PPL in your project and use the public VIs, either called directly (just like a normal subVI) or dynamically with the VI's path.  If using dynamically called VIs, I recommend using the Get Exported File Path to get the real path of the VI you want to call that is inside of the PPL.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 9 of 9
(4,157 Views)