From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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 4
(6,268 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 4
(4,647 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 4
(2,922 Views)

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

Set Icon Text.png

0 Kudos
Message 4 of 4
(2,198 Views)