07-24-2017 05:44 AM
Is there a way to specify the default window size when the "new VI" action is invoked? Both for the block diagram and front panel?
In 99% of cases the front panel is way too large by default. I know I can just resize after, but it's becoming tedious to do.
Solved! Go to Solution.
07-24-2017 10:09 AM
1. Use template.
2. Create a VI to dynamically call the template. Save the VI as lv_new_vi.vi at:
C:\Program Files (x86)\National Instruments\LabVIEW 201x\resource\plugins\lv_new_vi.vi
lv_new_vi.vi will be called whenever you create a new VI.
07-24-2017 10:45 AM - edited 07-24-2017 11:11 AM
Thanks for the info George.
I've created a template (new_vi.vit) and a VI named lv_new_vi.vi and placed it under the directory mentioned, but it doesn't seem to invoke it when I use File-> New VI or Ctrl+N.
I've restarted LabVIEW as well.
Solved:
The lv_new_vi.vi must have an I32 indicator named "return value" wired to the top right connector.
0 for no error
1 for error
https://lavag.org/topic/11373-lv_new_vivi-conpane/
VI attached (saved for 2009)
07-24-2017 10:46 AM
For SubVIs where the front panel is never seen, I like to use this quickdrop shortcut:
It aligns the front panel controls and indicators just like you have connected them on the connector pane. If you use it on the block diagram, it will resize the window to be just a little bit larger than your code, unless your code exceeds your screen size.
07-24-2017 10:56 AM - edited 07-24-2017 10:57 AM
Fixed it
The lv_new_vi.vi must have an I32 indicator named "return value" wired to the top right connector.
0 for no error
1 for error
https://lavag.org/topic/11373-lv_new_vivi-conpane/
Thanks!
07-24-2017 10:59 AM - edited 07-24-2017 11:04 AM
That looks useful. I'll give that a try as well.
Thanks
Edit: Quick Drop takes a ridiculous amount of time to populate the list initially, so I'll have to give that a miss or assign it to a menu.
07-24-2017 12:20 PM
Hi Matt,
It should not take that long to populate quick drop, maybe 5 or 10 seconds... You can have it pre-load the palettes and quick drop on launch if you like, then you don't get that annoying "please wait while list is populating..." message. Go to tools >> options:
07-26-2017 07:24 AM
I've just noticed that this doesn't work for New -> VI from the right-click menu on a project item
Is there any way to override this as well?
07-26-2017 07:32 AM - edited 07-26-2017 07:35 AM
Thanks Greg
I have mine set to load when needed to keep the LabVIEW start-up reasonably fast.
What annoys me with the Quick Drop is that the loading/population is UI blocking (Windows even thinks LabVIEW has stopped responding) which is a really bad design.
07-27-2017 03:53 AM
Hi Matt
I think you can get around this by right clicking my computer and instead selecting New > New... > VI > From Template. Or you can put the vit file in the project, and then right-click it and select "New VI from template".
Best regards,
LeahE