LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to edit the VI icon with scripting ?

Hi all

I would love to edit the VI icon via VI scripting

Just to write the VI name into the Icon

Is that possibility

Jürgen

0 Kudos
Message 1 of 6
(7,079 Views)

Hello,

Yes, it is possible.

I suggest you take a look at Mark Balla's Icon Editor on the LAVA code repository, it is really great and it will show you how you can write text on a VI's icon programmatically.

Here's the method that can set the icon :

icon.jpg

Now on : how to generate the image data cluster from the text you want to put on the icon, I let you take a look into the code.

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 6
(5,458 Views)

Hi

I found this example...

https://www.hampel-soft.com/blog/vi-scripting-add-glyph-to-vi-icon/

 

Their git hub page:

https://gitlab.com/hampel-soft/hse-labs/hse-scripting-tools/blob/master/LV2013/Basic/VI%20Icons/Add%...

 

It uses VIs from C:\Program Files (x86)\National Instruments\LabVIEW 2019\vi.lib\LabVIEW Icon API\

 

It can manage the layers of the VI icon. You can also extract the icon image layers. 

 

Nick

Message 3 of 6
(3,733 Views)

This implementation make use of VIs available in <vi.lib>\LabVIEW Icon API

Set Icon Text.png

0 Kudos
Message 4 of 6
(3,009 Views)

His editor is a good thing, it works very well, but it can conflict with LabVIEW object oriented development tools, LabVIEW object oriented property accessor generator tool uses LabVIEW built-in icon editor api, when I use its editor to replace LabVIEW built-in icon editor tool, LabVIEW property accessor tool wouldn't work properly.

0 Kudos
Message 5 of 6
(517 Views)

@juergen wrote:

Just to write the VI name into the Icon


Quick drop CTRL+K does this. 

0 Kudos
Message 6 of 6
(509 Views)