Jump to content

[CR] Icons


Recommended Posts

index.php?app=downloads&module=display&section=screenshot&id=109

Name: Icons

Submitter: jgcode

Submitted: 13 Dec 2009

File Updated: 13 Dec 2009

Category: LabVIEW IDE

Version: 1.0.0-1

LabVIEW Version: 2009

License Type: BSD (Most common)

Icons v1.0.0-1

Copyright © 2009, Jonathon Green; JGCODE

All rights reserved.

Author: Jonathon Green

LAVA Name: jgcode

Contact Info: Contact via PM on lavag.org

LabVIEW Versions:

LabVIEW 2009

Dependencies:

No dependencies

Description:

Discussion contains video demonstration

Temporarily located here

Installs a range of icons to the LabVIEW Data Directory folder (osdatadir) for use with the LabVIEW 2009 Icon Editor. Icons include icon templates, LVOOP banner and object icons and commonly used glyphs.

The LabVIEW Data Directory (osdatadir), by default, is located at C:\Users\(User Name)\Documents\LabVIEW Data for Windows Vista and Windows 7 and C:\Documents and Settings\(User Name)\My Documents\LabVIEW Data for Windows XP.

LabVIEW 2009, by default, stores Glyphs in the (osdatadir)\Glyphs folder and icon templates in the (osdatadir)\Icon Templates folder.

For this package the installation locations are sub folders within these folders:

Commonly used glyphs - (osdatadir)\Glyphs\_glyphs

LVOOP Templates - (osdatadir)\Icon Templates\_lvoop icons

Icon Templates - (osdatadir)\Icon Templates\_template icons

An underscore is used to alphabetically rank the folders, moving them to the top of the list in the LabVIEW Icon Editor.

Menu items are also installed for LabVIEW under File >> Icons to open the default folder locations from LabVIEW.

Menu selections include:

File >> Icons >> Template Icons - opens the (osdatadir)\Icon Templates folder

File >> Icons >> Glyphs - opens the (osdatadir)\Glyphs folder

This is makes it easy to open and browse all images from LabVIEW. Menu items are installed under (LabVIEW)\Wizard\Icons folder.

Installation and instructions:

Install package using VIPM.

Restart LabVIEW for the Menu Items to take effect.

Examples:

Open the Icon Editor to view the installed icons

Browsw the File >> Icons menu item to open the folder locations from LabVIEW.

Known Issues:

Due to no support for osdatadir in VIPM and OGPB and the fact that this location is not LabVIEW Versioned, the user should only install the package in one version of LabVIEW. (As of LabVIEW 2009, this is the only option).

Acknowledgements:

OpenG

ICON Technologies

Version History (Changelist):

1.0.0-1 2009 12 05

[New] Initial release of the code (LabVIEW 2009)

License:

Copyright © 2009, Jonathon Green

All rights reserved.

Redistribution and use in source and binary forms, with or without

modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright

notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright

notice, this list of conditions and the following disclaimer in the

documentation and/or other materials provided with the distribution.

* Neither the name of the <organization> nor the

names of its contributors may be used to endorse or promote products

derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY <copyright holder> ''AS IS'' AND ANY

EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY

DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES

(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND

ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS

SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Support:

If you have any problems with this code or want to suggest features:

please go to lavag.org and Navigate to LAVA > Resources > Code Repository (Certified) and search for the LVOOP Custom User Scripting support page.

Distribution:

This code was downloaded from the LAVA Code Repository found at lavag.org

Click here to download this file

Edited by Mark Balla
Link to comment

Good video. I hate going through and changing the class colors. Your templates will certainly save me time.

I've struggled with using the templates as they don't always behave the way I intuitively expect, especially when adding text. sad.gif I've seen some discussion about it elsewhere but I don't remember what it said or where I saw it.

As a completely unrelated aside, I didn't know you are Aussie. For some reason I had it in my head you're in North Carolina, though as I look around LAVA now I don't know why I thought that.

Link to comment

Good video. I hate going through and changing the class colors. Your templates will certainly save me time.

I've struggled with using the templates as they don't always behave the way I intuitively expect, especially when adding text. sad.gif I've seen some discussion about it elsewhere but I don't remember what it said or where I saw it.

As a completely unrelated aside, I didn't know you are Aussie. For some reason I had it in my head you're in North Carolina, though as I look around LAVA now I don't know why I thought that.

Thanks mate (I thought that would be the give away I am Aussie :))

I love the new Icon Editor but it does need some a-lot-of work.

I had this problem - I don't know if that is what you are referring to? But you made a post also.

Link to comment

A related thought that might be good for this thread.

A mass icon editor user interface.

One that would easily let you, for any library (LVOOP or otherwise), see ALL the icons displayed and easily allow you to edit them simply by double clicking

I've done a mock-up for this but still incomplete, but really should be quite simple if someone runs with it.

The basic idea is that you have an interface that you point at a library.

It displays all icons at once so you can make sure that you have a library iconography that all matches and if you need to edit some, 1, all icons.... you now have an interface that might allow that to happen.

There are too many times that I set up a library and only after the fact of some minor change, something goes haywire in propagating nested library icons and some/all get messed up.

So if there was a way to see all icons at once and easily change 1/some/all managing library based icons would be Sooooo much easier.

y'all agree??!

Link to comment

A mass icon editor user interface.

One that would easily let you, for any library (LVOOP or otherwise), see ALL the icons displayed and easily allow you to edit them simply by double clicking

This is a great idea. Does it interface to the existing Icon Editor? I think it should fit within the realms of the existing Icon Editor framework - the ability to edit the templates on the fly. Having dynamic folder links as well as the static ones in LabVIEW Data folder.

I would like this to be handled for a project as well as libraries. I.e. icons get stored in a project file (which would be templates for the project) and when you open the Icon Editor with the project open it sees these icons and you can mass edit them easily.

I've struggled with using the templates as they don't always behave the way I intuitively expect, especially when adding text. sad.gif I've seen some discussion about it elsewhere but I don't remember what it said or where I saw it.

Sometime I don't use the templates as templates - I just want them there so I can cut and paste them quickly. I also take advantage of the NI_Library tag even tho the VI is not in a library. This seems to clear up the problems of misaligned text. When I actually use a Library I don't have this problem.

<object width="1135" height="719"> <param name="movie" value="

http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/jingswfplayer.swf"></param>'>http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/jingswfplayer.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/FirstFrame.jpg&containerwidth=1135&containerheight=719&content=http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/NI_Library%20Icon%20Tag.swf"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/"></param>'>http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/"></param> <embed src="http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/jingswfplayer.swf" quality="high" bgcolor="#FFFFFF" width="1135" height="719" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/FirstFrame.jpg&containerwidth=1135&containerheight=719&content=http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/NI_Library%20Icon%20Tag.swf" allowFullScreen="true" base="http://content.screencast.com/users/jgcode/folders/Jing/media/cc6ba411-bc64-48d7-9988-70c2d769d998/" scale="showall"></embed> </object>

  • Like 1
Link to comment

Sometime I don't use the templates as templates - I just want them there so I can cut and paste them quickly. I also take advantage of the NI_Library tag even tho the VI is not in a library. This seems to clear up the problems of misaligned text. When I actually use a Library I don't have this problem.

Cool trick with NI-Library! That's definitely kudo-worthy! It never occurred to me to copy the template over to the layers either. If you had posted that in a separate message I could've given you two kudos! laugh.gif

Edited by Daklu
Link to comment

If you had posted that in a separate message I could've given you two kudos! laugh.gif

Noooooooooooooooo!!! :(

:lol:

Cool trick with NI-Library!

Sweet! That tag seems special as once you type it you cannot change its name!

You have to delete that item to get rid of it.

  • Like 1
Link to comment

For a few seconds I couldn't figure out if you were an Aussie or a South African!

(am from SA myself...)

I like to keep people guessing :ph34r:

Nice video. On a tangent, any idea how to change the colour of a class cube in the lvproj tree?

Thanks.

What are you trying to achieve?

Matching the color of the class to the class icon in the project??

Endevo do it. As far as I know them and JKI are the only companies to have binary project integration (or whatever its called) for their products so I am guessing it is done through this??

I guess someone at NI or maybe Endevo could answer this one.

Link to comment

I only noticed this when tinkering with the Endevo toolkit. I thought it was nice and wondered if there was an easy way to do it.

Thats the only place I have seen it.

I don't know if it's easy or not to do.

Maybe its as simple as that data being located in the .lvclass file?

Link to comment

Thats the only place I have seen it.

I don't know if it's easy or not to do.

Maybe its as simple as that data being located in the .lvclass file?

A while ago I was told that there is a VI that accomplishes this that we can use in vi.lib.

I can't find the information that directed me towards it, but hold out and someone should be able to direct us to it.

Link to comment

A while ago I was told that there is a VI that accomplishes this that we can use in vi.lib.

I can't find the information that directed me towards it, but hold out and someone should be able to direct us to it.

That sounds very cool

So far I could only find this link which says it cannot be done. Maybe they are hiding it! :ph34r:

Link to comment

That sounds very cool

So far I could only find this link which says it cannot be done. Maybe they are hiding it! :ph34r:

Copied my post from the dark side

As Holmes said to Watson...."Dig Deeper"

C:\Program Files\National Instruments\LabVIEW 2009\resource\plugins\lv_newclassctl.vi

You will need to dig into it to properly understand it, but at the basic level this VI takes a grey cube picture as a constant and replaces the color on the grey cube w/ translated shaded colors and replaces those pixels on the input icon.

Some effort is warranted putting this into an example, I just don't have the time at the moment. I look forward to seeing what you do with it.

~,~

The Captain was here

  • Like 1
Link to comment

The class cube seems to be stored as a tag in the .lvclass:

<Property Name="EndevoGOOP_ClassItemIcon" Type="Str">GrayFull</Property>

Where the GrayFull has a corresponding png file in the Framework\Providers\Endevo directory

You can manually edit the .lvclass file and change the tag to some other icon name, and it shows correctly in the lvproj file :-)

(But I have the GDS installed!)

Good find!

I wonder if there is a native tag to point to a glyph?

Link to comment

It never occurred to me to copy the template over to the layers either.

I must be a friggin idiot. For the life of me I cannot get the clipboard to grab a copy of the template. I've tried following exactly what you do in the video but it always pastes an empty canvas. frusty.gif Did you secretly put a copy of the banner on your clipboard before you started recording? shifty.gif

Link to comment

I must be a friggin idiot. For the life of me I cannot get the clipboard to grab a copy of the template. I've tried following exactly what you do in the video but it always pastes an empty canvas. frusty.gif Did you secretly put a copy of the banner on your clipboard before you started recording? shifty.gif

Haha nope! No cheating here.

Don't know if that makes a difference - I am running 9.0f2 with the update for IE.

And if it helps, here are the exact steps I do:

  1. Start on Layers Tab with a Icon Template selected
  2. Double click the Select Tool to put a marquee around the icon preview
  3. Hit Ctrl + C for the copy shortcut
  4. Click in the User Layers control
  5. Hit Ctrl + V to paste
  6. The new layer will have the tag Clipboard

It works if User Layers exist of there are no User Layers, with Icon Text or without.

Let me know how you go.

Cheers

-JG

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
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.