LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change LVOOP Class Icon Color on All Members

I have a LVOOP class hierarchy (LV2009) composed of several classes that when created I used the default randomly selected color for each class.  For each class I have developed several member elements (VIs, Ctls, etc), and now I have decided on a color scheme I would like to adopt.  Changing the color on the template icon from the class properties will allow me to propagate those changes to the class member VI icons but it does not seem to have an impact on the class control icons on each of the member VI front panels.  The class data member control has the cube with the original color.  I like the idea of keeping the standard cube glyph, but changing the cube color and shading pixel by pixel is not appealing.

 

Is there an easy way to change the color scheme of an entire class that will update the color on the VI member Icons, the data member control and all instances of the control?

Is there an easy way to change the color of the standard cube glyph that is used by default on data member controls?

Is the cube glyph in a glyph library somewhere?

0 Kudos
Message 1 of 12
(10,482 Views)

Hi Joe,

 

I am unsure about changing the color, I will have to ask around about that here in the office.

 

About the glyphs: I assume you are talking about this one:control glyph.jpg?

A quick glance in the NI Icon Library and I was unable to find it but there are other similar ones under the C's and L's

Joshua B.
National Instruments
0 Kudos
Message 2 of 12
(10,457 Views)

Hi Joe,

 

LabVIEW does not allow changing the glyphs in the LabVIEW project.

Joshua B.
National Instruments
0 Kudos
Message 3 of 12
(10,433 Views)
No, I was speaking of the class data member control icon: control icon.JPG
0 Kudos
Message 4 of 12
(10,412 Views)

There is not a way to associate the color of the cube glyph (class data member control icon) with the color of the class template.  If I had just a couple classes I would just change them manually.  If I had a whole lot of classes, I would probably draw the cube in another program (that would do the shading automatically) and turn the image into a glyph that you could use in the icon editor.

 

 

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 5 of 12
(10,374 Views)

As Holmes said to Watson...."Dig Deeper"

 

C:\Program Files\National Instruments\LabVIEW 2009\resource\plugins\lv_newclassctl.vi

 

You will need to dig into it to properly understand it, but at the basic level this VI takes a grey cube picture as a constant and replaces the color on the grey cube w/ translated shaded colors and replaces those pixels on the input icon.

 

Some effort is warranted putting this into an example, I just don't have the time at the moment. I look forward to seeing what you do with it. 

 

~,~

The Captain was here 

Message 6 of 12
(10,324 Views)

Justin_P wrote:

There is not a way to associate the color of the cube glyph (class data member control icon) with the color of the class template.  If I had just a couple classes I would just change them manually.  If I had a whole lot of classes, I would probably draw the cube in another program (that would do the shading automatically) and turn the image into a glyph that you could use in the icon editor.

 

 


I have attached a psd file (inside the zip) that will allow you to shade any color cube for this glyph creation.  Simply change the color in the "Color" layer and the shading will apply automatically.  Please note, you will need to flatten all the layers before you can copy and paste this into labview.

Message 7 of 12
(9,954 Views)
Thanks for providing this Noxious.  I'm sure other users will find this helpful.
Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 8 of 12
(9,898 Views)

I found this post whilst searching for a solution to the same issue today and wrote a project provider that allows you to change it from within LabVIEW easily.

 

Right click on the private data member (not the class) and choose either "Recolour Class Icon" or "Recolour Class Icon..." to change the icon using a copied version of the VI that Norman described 7 years ago. The version with ellipses opens a dialog allowing to change to a custom colour or choose a point by clicking on the picture of the class icon, the version without ellipses changes the colour based on the value of the class icon at the top-left corner, inset by one point (i.e. coordinate (1,1), inside the common black box).

 

The provider has only been tested in 2017, but is also backsaved (and untested) to 2013 (which I chose more or less at random - it might be possible to go back slightly earlier but I don't know when Project Providers became available).

 

They should be extracted and copied into <LabVIEW Directory with year>\resource\Framework\Providers\ (which should already include a directory named "GProviders").

 

Spoiler
If you prefer "Color" to "Colour" then you can change the strings inside the RecolourClassDataObject_Item_OnPopupMenu.vi. You'll need to restart LabVIEW.

Although you could also change the VI file names, if you change the "Interface" VI name, you'll need to change the INI file, which would then require re-signing.
Spoiler
Additional VIs are currently unused - these provide support for changing a bunch of classes at once. I don't know that I'll use it, so I didn't implement it yet. If you want it, shout and I'll write it, or you can write it yourself (the INI already supports it, so won't need resigning.)

 


GCentral
Download All
Message 9 of 12
(8,413 Views)

Based on the code above, I've made a simle vi that allows you to quickly recolor the cube.

 

Just insert it into a new vi as shown in the image below, and run it.

BjornH_1-1602748704324.png

 

Message 10 of 12
(6,938 Views)