From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a default icon and replace current one

Guess it is time for a Ctrl-Space Ctrl-N QD shortcut then...

0 Kudos
Message 11 of 14
(826 Views)

whoops


"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 14
(797 Views)

@Darren wrote:

The "Default Application" property always returns the main application instance...so when you have a project open (or a VI from a project open), Ctrl-N with your plugin VI creates the new VI in the main application instance...not the appropriate application instance from within the project. I tried playing with the code, including calling some private methods, and I couldn't get the plugin VI to properly return a reference to the "active" application instance, i.e. where the VI would normally get created when pressing Ctrl-N. If y'all figure out a way, let me know.


Use Project.OwningProject to get App, works fine.

The template opens in the same application instance as the active VI/project.

 

untitled.png

 

 

George Zou
0 Kudos
Message 13 of 14
(740 Views)

Use Active project.

 

George Zou
0 Kudos
Message 14 of 14
(727 Views)