05-13-2008 06:51 AM
05-13-2008 07:45 AM
You can't insert an exe into the sub panel...BUT you could register the sub vi as an ectivex component and use an activeX container instead.
OR
You could call the VI for the subpanel dynamically and put the vi in a support directory instead of rolling into the executable.
05-13-2008 07:51 AM
05-19-2008 06:45 AM
05-19-2008 07:36 AM - edited 05-19-2008 07:39 AM
I think hidden in the support directory would be good enough, and it lets you replace the VI as you need to...The other option is to hide it in a library. I dont think you can "hide" it in an exe and still have the ability to do what you want with it.
Creating it as an ActiveX object is not too hard either though, you should be able to do a search in the help directorys and find out how to do that quiet easily.
09-21-2008 04:11 AM
well, i tried to understand what you explained but really couldn't manage to get it...
i want to run a standalone .exe file lets say somthing like ie.exe from a push button on the vi interface..
is it possible to do that? what is the simplest way to do it?
09-21-2008 04:54 AM
Hi Rabih,
Subpanels support only LabVIEW VIs. .NET and ActiveX Containers support a bunch of application/object-interfaces, though, I don't know of a Container that supports an arbitrary Windows application. The example you gave, "IE", happens to be supported by/for .Net and ActiveX Containers.
You'll find the IE browser example here!
Cheers!
09-21-2008 06:44 AM
The usual method for calling a *.exe file in LabVIEW is to use the System Exec VI. The System Exec VI is located in the Communications palette in LabVIEW 7.x or the Connectivity » Libraries & Executables palette in LabVIEW 8.x.
Refer to the Calling System Exec VI in the <labview>\examples\comm directory for an example of using the System Exec VI. Or, refer to the attached example for a simple way to run the Windows Calculator program from within LabVIEW (minimum of LabVIEW 8.0 required).
Unfortunately, the System Exec VI does not support calling options following the filename. In order to call the executable with options, here is what you can do instead:
1. Create a filename.bat file which calls the executable file with the options following the title ("filename.exe -option1 -option2"].
2. Then use the LabVIEW System Exec VI to call the filename.bat file, and those options will be ported over.
Here are a few key notes about the System Exec.vi :
* You can directly call an external file that is not an executable. For example, we will use a file named "My Document.txt". You cannot type "MyDocument.txt" into the command line input of the System Exec.vi. You can, however, type "Notepad My Document", and the System Exec vi will open the .txt file in notepad.
* Please also note the "Wait Until Completion" input to System Exec.vi. This inputs default setting is True, meaning that LabVIEW will wait until the executable program is done running and gone from memory before LabVIEW will continue with the rest of its code. If this input is set to False, LabVIEW will open the executable, but then continue on with the rest of the LabVIEW code.
source: NI website
09-23-2008 12:15 AM
Hi Rabih,
The old thread you posted to was discussing subpanels - and I interpreted your question in that context.
My mistake.
Cheers!