LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Library Icon is not being applied to classes created under it

Solved!
Go to solution

I'm playing around with the icon editor in a scratch project.  I created a library (.lvlib) and edited its icon.  When I add a class by right-clicking the library in the project explorer and selecting "New>Class" the icon it has is completely different - looks like a default one to me with a yellow banner and no text.  I created a VI in the same way and its icon does appear to be inherited from the library.

 

I thought any object that belongs to a library inherits its icon from the library?  Are classes treated differently?  If I open the icon editor for the class and select the Edit menu item the option "Import Icon from Owning Library..." is greyed out and not selectable.  I tried searching the forum but couldn't find anything so I suspect I'm doing something wrong.

0 Kudos
Message 1 of 4
(602 Views)
Solution
Accepted by topic author andrewDJ

Hi Andrew,

 

This is normal because a class redefines its own icon banner, which will be used for its VIs.

The same applies for a library inside a library.

 

This is also why the option you mentionned in the icon editor is grayed out for a class/library icon.

 

Regards,

Raphaël.

Message 2 of 4
(569 Views)

Ok, thanks.  It would seem that when NI say in the documentation that all objects in a library inherit the library’s icon, they actually mean some objects, specifically VIs.  Even subclasses don’t inherit the parent class icon, which I guess makes sense as I’ve read somewhere classes are just libraries.

 

Icon template it is then.

0 Kudos
Message 3 of 4
(531 Views)

@andrewDJ wrote:

Ok, thanks.  It would seem that when NI say in the documentation that all objects in a library inherit the library’s icon, they actually mean some objects, specifically VIs.  Even subclasses don’t inherit the parent class icon, which I guess makes sense as I’ve read somewhere classes are just libraries.

 

Icon template it is then.


I guess that's an artifact. When libraries were created there were no classes, so they only included VIs and Ctls, all of which got the icon. 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 4
(511 Views)