07-29-2010 02:45 PM
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:
This method, however, is marked as depreciated. Is there another method that I should use instead?
Solved! Go to Solution.
07-30-2010 02:33 AM
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.
07-30-2010 05:58 AM
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.
07-30-2010 07:49 AM
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.
08-25-2010 12:59 AM
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
08-25-2010 07:49 AM
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...
08-25-2010 08:13 AM
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
08-25-2010 08:51 AM
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.
08-25-2010 09:19 AM
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+?
08-25-2010 11:54 AM
Omw now... leaving b4 anyone else tries to talk to me