Jump to content

VI Icon: Difference between revisions

From LabVIEW Wiki
m Move to Category:VIs
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{update}}
The '''VI Icon''' is used to represent the function of the [[VI]] as a [[SubVI]] on the [[Block Diagram]]. 
{{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.


== VI Icon Importance ==
== Editing the VI Icon ==
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.
See [[Icon Editor]].


== How to Make icons smaller than the entire square ==
== History ==
Sometimes it is desirable to make a LabVIEW subVI's icon smaller than the normal 32x32 pixelsNational Instruments has done this with several primitives and has made it possible for end users to make custom icons of any size for a subVIIt is good practice to ensure that terminals used line up logically with the borders of the smaller VI created.
{| 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''').
|}


Starting with a typical icon editor<br />
== See Also ==
[[Image:Typical_icon_editor.png]]<br />
* [[Icon API]]
<br />
Clear the default icon from the 256 icon, then click on the "Show Terminals" checkbox.  Draw a box, around the terminals you wish to have displayed on your custom icon.<br />
[[Image:Icon_editor_with_small_icon.png]]<br />
Fill the 256 color icon with a color of your choice, as well as any words or symbols you wish to use to describe your subVI's work, then copy the subVI to the black and white icon by selecting the black and white icon and pressing the copy from 256 color button on the right.<br />
[[Image:Icon_editor_with_all_small_icons.png]]<br />
 
 
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.
<br>'''NOTE:''' White space icon transparency is lost if a VI edited in this way is used from within a Packed Project Library (PPL) distribution.  The icon placed on a block diagram from a PPL reverts to its original 32x32 icon area with white fill in place of transparencies.  This is the case for LabVIEW IDE versions as recent as 2017 SP1.
 
== Other icon tricks ==
===Double Click===
There are certain tools in the icon editor that are "double-clickable".  Double clicking on the selection, filled box, and empty box tool icons in the editing palette will apply that tool to the entire icon square. Double clicking on the font tool will bring up a font dialog for selecting font name, size, color, justification, and style (bold, italics, etc).
[[Image:Double_Clickable_Icon_Editor_tools.png]]
 
===Move text===
While typing a text into the  Icon Editor the text is movable by using the arrow keys on the keyboard.
 
== Alternative Icon Editors ==
As of LabVIEW 8.0 a custom icon editor could be built and called from LabVIEW to edit icons of VIs.  The relevant information to replace the built in VI icon editor is available [http://forums.lavag.org/index.php?s=&showtopic=3320&view=findpost&p=12920 here].


[[Category:LabVIEW fundamentals]]
[[Category:LabVIEW fundamentals]]
[[Category:Calling a VI]]
[[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