LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to build exe with user selected VI


@faustina wrote:

no I can't seem to find them anywhere under the .exe.  I'll try your solution.


Can't find in what sense?  You are likely to be able to reference them (by relative path, if not by absolute path) inside the EXE, but you will not be able to browse to them in a file browser.

Try as I suggested: in the build specification create a new destination, then under Source File Settings set the destination for those always-included plugins to be that new destination folder.

0 Kudos
Message 11 of 18
(538 Views)

Thank you for the subVI debugging tool.  Boy, are the files buried!  I could only browse to them with the file browser after I specified in Source File Settings to put them in 'support directory.'  The problem is there a LOTS of VIs in the support directory.  This will much too confusing for my users.  How do I create a new 'support directory' that will only contain the VIs for my users to select?

0 Kudos
Message 12 of 18
(531 Views)

@faustina wrote:

How do I create a new 'support directory' that will only contain the VIs for my users to select?


Again: in the build specification, under "Destinations" create a new destination that will contain those VIs.  Then, under Source File Settings, select the VIs (or the folder that contains them) and set the destination to be the new destination that you created.

0 Kudos
Message 13 of 18
(527 Views)

Even if I create a new directory in the Destinations page, all the subVIs called the user called VIs end of in the same directory.  How can I prevent this?  see enclosed PPT file

0 Kudos
Message 14 of 18
(523 Views)

Hmmm... looks like all the dependencies for those VIs are put in the same location as the VI.  Didn't realize that would happen (I haven't played with these options much).

Sorry, I don't have an immediate answer, I hope someone else who does will contribute.

0 Kudos
Message 15 of 18
(518 Views)

Another options is to create a separate Source Distribution build specification that will copy only the plug-in VIs to the appropriate directory.  This allows you specifically exclude files if necessary (for example, the common subVIs).  Maybe this will work for you?

0 Kudos
Message 16 of 18
(514 Views)

@nathand wrote:

Another options is to create a separate Source Distribution build specification that will copy only the plug-in VIs to the appropriate directory.  This allows you specifically exclude files if necessary (for example, the common subVIs).  Maybe this will work for you?


I tried this at first too. It works, however if your main VI communicates with the plugin's using globals, it will break. I think the source distribution creates a copy of the global and the main executable compiles it's own.

 

So it may work for you, but it depends on your needs.

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 17 of 18
(509 Views)

@faustina wrote:

Thank you for the subVI debugging tool.  Boy, are the files buried!  I could only browse to them with the file browser after I specified in Source File Settings to put them in 'support directory.'  The problem is there a LOTS of VIs in the support directory.  This will much too confusing for my users.  How do I create a new 'support directory' that will only contain the VIs for my users to select?


If the browsing is causing problems, I'll give a few shots in the dark as alternatives. Maybe one will work. If not, feel free to ignore this.

 

 

Maybe you could have a identifier in the file name to search for. For instance "TestXXX_plugin.vi" and just exclude VI's without "_plugin.vi" from the browse

 

Maybe you could have a predefined list of VI's in a text file. On startup, you load that list and give the user a drop-down menu.

 

Personally, my project had a text file that had two columns: A descriptive name and a relative VI location. The descriptive name was loaded into a list box. The user could select from the list box and click "run". The VI then found the corresponding location and ran the VI.

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 18 of 18
(507 Views)