Jump to content

VI Icon: Difference between revisions

From LabVIEW Wiki
No edit summary
m Move to Category:VIs
 
(19 intermediate revisions by 7 users not shown)
Line 1: Line 1:
== How to Make icons smaller than the entire square ==
The '''VI Icon''' is used to represent the function of the [[VI]] as a [[SubVI]] on the [[Block Diagram]]. 
First, draw the border for the icon in the B&W icon view. Be sure to align the icon to the wiring terminals by using the Show Terminal check box. This defines the icon outline. If you have no border drawn in the B&W view, it defaults to the whole square (in my limited tests, you get a "no outline in B&W view default will be used" dialog). The icon border will actually be the largest of the drawn areas in the three icon views. So actually, you need only draw a single dot on the B&W view to define your 256 colour drawing as the border limit. Something must be drawn in the B&W view to get the selection border for the icon on your diagrams to conform to the drawn outline (is this a useful feature? seems like you could have nothing drawn in this view by defaults and have it still work).
{{TOCright}}
== Best Practices ==
The icon you use to represent your [[SubVI]] can tell you or other developers a lot about what the [[SubVI]] does without ever having to open the [[SubVI]]. Taking the time to create at least simple text VI icon is a requirement when sharing code between developers. The use of images in VI icons can also enhance their meaning when text can't be used because of length or in cases where code is shared across different spoken languages.  National Instruments keeps an [http://www.ni.com/devzone/idnet/library/icon_art_glossary.htm Icon Art Glossary] to help developers who are less experienced making easy to recognize icons.


Second, Click on the 256 colour icon view (if that's what you use), and click Copy from Black & White to get your border. Then finish drawing the icon to your liking, link it up, and presto, small icon. Wires to border, transparent outside, etc. You can even make irregularly shaped icons. The white area outside will be transparent in your diagrams. Interestingly, if the border you define is not contiguous, the inside of your icon will also be transparent (you can see a wire go all the way to its connection point (visible as a little cross in the "show terminals" icon view). You can actually have multiple non-transparent areas in your icons if you wish. Very cool! You could have a wire pass between two blobs to represent some subtle transformation on the data if you really wanted to go all out, but this actually requires drawing wires between the connection points on the icon to make them look contiguous.
== Editing the VI Icon ==
See [[Icon Editor]].


== Alternative Icon Editors ==
== History ==
{| class="wikitable"
! Version
! Change(s)
|-
| [[File:LV8-2013.png|frameless|border|64x64px|LabVIEW 2012|link=LabVIEW 2012]]
| In [[LabVIEW 2012]] the [[Icon API]] is released as [[Class (object-oriented programming)|Object-Oriented Classes]].  It allows for scripting Icons with access to Text, Glyph, and user layers.
|-
|[[File:LV8-2013.png|frameless|border|64x64px|LabVIEW 2011|link=LabVIEW 2011]]
|In [[LabVIEW 2011]] the Connector Pane was changed to always be visible on the [[Front Panel]] window next to the [[VI Icon]].  [[LabVIEW 2010]] and earlier only the Connector Pane or the [[VI Icon]] was visible at a time and they were toggled between via a right-click menu ('''Show Connector''' or '''Show Icon''').
|}
 
== See Also ==
* [[Icon API]]
 
[[Category:LabVIEW fundamentals]]
[[Category:VIs]]

Latest revision as of 16:49, 7 August 2024

The VI Icon is used to represent the function of the VI as a SubVI on the Block Diagram.

Best Practices

The icon you use to represent your SubVI can tell you or other developers a lot about what the SubVI does without ever having to open the SubVI. Taking the time to create at least simple text VI icon is a requirement when sharing code between developers. The use of images in VI icons can also enhance their meaning when text can't be used because of length or in cases where code is shared across different spoken languages. National Instruments keeps an Icon Art Glossary to help developers who are less experienced making easy to recognize icons.

Editing the VI Icon

See Icon Editor.

History

Version Change(s)
LabVIEW 2012 In LabVIEW 2012 the Icon API is released as Object-Oriented Classes. It allows for scripting Icons with access to Text, Glyph, and user layers.
LabVIEW 2011 In LabVIEW 2011 the Connector Pane was changed to always be visible on the Front Panel window next to the VI Icon. LabVIEW 2010 and earlier only the Connector Pane or the VI Icon was visible at a time and they were toggled between via a right-click menu (Show Connector or Show Icon).

See Also