Jump to content

customize existing VI icon programmatically


Recommended Posts

Hi,

We're about to re-structure our VI source tree and therefore I'm looking for a way to automatically edit/change the VI icons as well. To do so, I want to open all VI's and change the icon text as well as add a new icon layer (on top) and then save this VI (perhaps also rename it, move it to another location ...) The only problem I have - I can (with help of Icon editor API) open the existing VI, get the icon data (separate entries for text, different layers, ...) and adjust them to new informations/texts/icon layers. But it is not possible to write back these changes to existing VI, I can only create a new VI with this data. Or I can overwrite any old icon settings by passing a new icon, loosing all different icon layers and separate texts.

Is there any way to edit an existing VI Icon without loosing the existing icon texts/layers? I even tried to open the original icon editor via script and do the edits with "SendInput" remote control of it's user interface. But didn't find a way to open the icon editor on first hand :-(

 

So any ideas highly appreciated!

Peter

Link to comment

If you put all the VI's into a library (.lvlib), you can edit the library icon and it will be applied to all the files in the library as a layer.  Most people use this to create a common "top banner" for their VI set.  The lvlib icon is overlaid as a layer on the individual VI's icons without disturbing changing or disturbing the other layers.  I assume that what you are trying to do is add some icon feature to a set of VI's that identifies them as being part of a set.

Link to comment

Hi,

thanx for all your suggestions, I will check them. BTW, I already knew of "LabVIEW Icon API" and used it to create new VI's with proper icons, but I was not able to edit existing ones, so that the existing layer structure is preserved. I only want to add a top-most layer, to keep the old ones still available as backup...

But I will check again, also the OpenGDS.

To clarify my approach, I've added a sample vi (LV2017). I want to open an existing VI, add a user layer and text, and save them a copy of the VI.

Peter

_Test_VI_Icon.vi

Edited by peterp
Added sample code
Link to comment
28 minutes ago, peterp said:

I already knew of "LabVIEW Icon API" and used it to create new VI's with proper icons, but I was not able to edit existing ones, so that the existing layer structure is preserved. I only want to add a top-most layer, to keep the old ones still available as backup...

Edit VI Icon.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.