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.

Enhanced Icon Editor

cancel
Showing results for 
Search instead for 
Did you mean: 

Expose "Merge Layers method" in Icon Editor API

Hi Tom!

(Unless it is available somewhere and I missed it)

Would it be possible to expose a Merge Layers method in the Icon Editor API?

I want to create a image as a preview (without changing the icon data) but I need a way to change the Layer Data then merge it all (User, Text, Template, opacities etc...) to create a preview image.

Obviously you already do this in the IE, any chance of a method whereby I can merge all the data to get an image in the Icon Editor API?

Thanks heaps!

-JG

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 1 of 13
(10,791 Views)

Good morning!

I just uploaded a new API.zip with

Icon Preview (VI)

Icon Preview (Library)

Icon Preview (LVClass)

Greets

0 Kudos
Message 2 of 13
(6,877 Views)

Sweet dude!

I can't wait to check it out.

Congrats on your first post to LAVA too

Regards

-JG

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 3 of 13
(6,877 Views)

Hey Tom

Just tried the new api.

Is there any way to merge all the data and see the image data (picture) but not update the e.g. the Class's icon?

In essence: getting a true preview before applying changes?

(If not, I can always just update the icon then set it back to previous data if the user e.g . cancels).

Thanks!

-JG

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 4 of 13
(6,877 Views)

Hey Jonathon,

I thought the 'Icon Preview' VI does return the image in 1bit and 24bit format.

It doesn't overwrite the icon information itself, it just reads it and merges all layers to get the true icon picture.

Did you use one of these VIs (Lib, LVClass and/or VI)?

Tom

0 Kudos
Message 5 of 13
(6,877 Views)

Hey Tom

The current Preview VIs show the current icon (this is cool - thanks).

This is the same as calling the GET ICON Method (then converting the image data to a picture)

However, I would like to alter the data e.g. User Layer(s) then preview it before I set it as the actual icon, which I cannot seem to do.

Is it possible for you to output the image data along with the two icons as well? (please)

That would be handy too.

MergeAPI.png

Here is a prototype I am thinking of.

I would be a Public "helper" function to compliment the API.

Prototype.png

Is this possible?

What are your thoughts?

Cheers

-JG

[Attached file LV2009]

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 6 of 13
(6,877 Views)

Now I got it!

I thought you want to have a preview of the already set icon.

I'll implement this right now.

Dunno how long it will take me, but it shouldn't be too terribly long.

Tom

0 Kudos
Message 7 of 13
(6,877 Views)

Whilst you are coding...

Some small fixes:

1) The Set Icon's library-method-polymorphic-selector-text is "Lib" not "Library"

2) Both Get Icon and Set Icon polymorphic VIs have no icon.

Attached are the icons I used (to save you the work if you want to use them?)

Cheers

-JG

Certified LabVIEW Architect * LabVIEW Champion
Download All
0 Kudos
Message 8 of 13
(6,877 Views)

Done.

I have added a VI called

Icon Preview (Offline).

None of the inputs is required though.

I have added it to the GET Icon poly as an independent item.

(GET and SET Icon do have an icon now (I was being lazy) and I reworded Lib to Library)

0 Kudos
Message 9 of 13
(6,877 Views)

(I am getting your messages via feed but not in this thread?)

Cool, can't wait to try it.

Thanks

-JG

Certified LabVIEW Architect * LabVIEW Champion
0 Kudos
Message 10 of 13
(6,877 Views)