Jump to content

Open VI Front panel programmatically without having to include the.vi in the build


Recommended Posts

Open VI Front panel programmatically without having to include the.vi in the build folder.

I'm using the invoke node to open the front panel and passing in a reference from a static vi reference. This appears to need the .vi file in the build folder to work but I would prefer not to include the .vi file as it's not very professional.

Any help appreciated.

Link to comment

There is also a way to have LabVIEW include the front panel of a VI when building an EXE, that doesn't require project editing and is instead on the VI level.  I'm not fully sure what these VI settings are, but what is happening is the compiler tries to determine if the front panel of a VI is used, and if it isn't then it removes it.  If you can adjust the VI to convince the compiler to keep it, then it doesn't need to be explicitly kept from the project settings. 

Some of these settings that I believe will convince the compiler to keep the front panel, is to adjust the Window Appearance settings of the VI.  For instance one thing I do is select the Dialog option, and then under Customize I will change Window Behavior to Default.  These VIs will have their front panel kept and I believe it is because things like Show Front Panel When Called makes the compiler believe this is a VI that will be shown to the user.  I think there are other things you can do to, like adding a property node in the block diagram that does an operation on the front panel.  This again makes the compiler believe it should keep the front panel

Link to comment

Property and invoke nodes can also uncheck 'Remove front panel' when 'Use default save settings' is checked. Ones that reference the front panel certainly do (e.g., front panel->open), but I'm not sure about ones that reference controls.

Link to comment

Sure, I do this all the time too for my free-running processes/actors, but for the situation as simple as a custom dialogue box it makes much more sense (to me at least) to call it as a regular sub-VI instead of convoluting the code with a dynamic call (just to get the FP not removed).

Inevitably what happens is I forget to change the settings in the build, however it is pretty simple to just re-build with the corrected settings.

Edit: I actually do it slightly differently, preferring to use the VI path rather than the name. Probably does not make much of a difference though.

Actor Launch.PNG

Edited by Neil Pate
Link to comment
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.