LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

depreciated method - User Interaction:Edit Icon

Solved!
Go to solution

I fell in love with the Quick Drop Keyboard Shortcut - Create Place VI Contents VI, but I wanted it to open the Icon Editor so I could make a useful icon before putting the VI into the palette.  I added it with the following function that I copied from Mark Balla's SubVI Fixer:
g_BD.png

This method, however, is marked as depreciated.  Is there another method that I should use instead?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 1 of 14
(11,627 Views)

I have a vague memory of the icon editor VI accepting a reference to the VI

to edit. Is this still the case?

The VI itself should be in \resource\plugins.


___________________
Try to take over the world!
Message 2 of 14
(4,998 Views)

It doesn't accept a reference to a VI, but neither does the depreciated method; they both take and return image data.  I think that LabVIEW calls whatever Icon Editor is named  \resource\plugins\lv_icon.vi.  If this is correct I can replace the Application method invocation with a direct call to the Icon Editor without worrying if someone has a non-standard editor (ie.: Mark Balla's).  I've done this on my PC and it works, so thank you.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 3 of 14
(4,998 Views)
Solution
Accepted by topic author jcarmody

The method is deprecated because it has been replaced with one having more inputs.  Unfortunately, the method is private, so does not show up, even if you have scripting enabled.  Here is a wrapper VI containing the method.  I will see if we can get it public in a future version of LabVIEW.

Message 4 of 14
(4,998 Views)

Hi DFGray

This is great - I have been asking for a similar thing over on the Enhanced Icon Editor Group

Can you post an example of how to use this?

I am more than happy to admit I am useless, but I keep getting Error 1

Thanks heaps

-JG

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 5 of 14
(4,998 Views)

I am getting the same error.  That may be why it is private, although it would be weird that the old method would be deprecated before the new one works.  Let me investigate...

Message 6 of 14
(4,998 Views)

Ok, well it's good that you see that too.

Also will the layering be preserved? (very important)

I am thinking a polymorphic interface with a VI/Control/Library (Project Library, Class etc...) Refnum input, that would launch the editor and update the icon if Ok was pressed, or do nothing if Cancel was pressed, would be ideal.

Given that Color.256.Image.Data is a required input, I don't think that layering would be preserved?

If it could be preserved and handled all internally that would be great.

VIPM launches the Enhanced Icon Editor - so there must be a way?

Cheers

-JG

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 7 of 14
(4,998 Views)

A bit of investigation revealed the real answer - you can manipulate VI icons using the VI Icons methods.  There are four of them.  You do not need scripting enabled to use them.  Drop a method; wire in a VI refnum; select VI Icon»methodYouWant.

0 Kudos
Message 8 of 14
(4,998 Views)

DFGray wrote:

A bit of investigation revealed the real answer - you can manipulate VI icons using the VI Icons methods.  There are four of them.  You do not need scripting enabled to use them.  Drop a method; wire in a VI refnum; select VI Icon»methodYouWant.

Those methods are ok for <2009.

But how to you get the image information into the Icon Editor and launch the Icon Editor programmatically (whilst preserving layers) in 2009+?

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 9 of 14
(4,998 Views)

Omw now... leaving b4 anyone else tries to talk to me

0 Kudos
Message 10 of 14
(4,998 Views)