LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nugget: Change the shape of the subvi in Block diagram

Most subVI icons are the default square shaped.

24452iEC5200B2904660B2

If the icon is to be designed to be a circle or a star, below is the procedure;

24450i49DE621D08A12154

Although, by default, the shape of the subVI Icon is square, there are ways in which you can make your icon look a different shape.  The reason that the subVI retains the square shape is because of the default black and white icon.  Typically, icons that follow good LabVIEW programming style should remain square.  To change your icon into something other than a square, follow these steps :

  1. Open Icon Editor by double clicking on the icon or right clicking on the icon and selecting Edit Icon.
  2. Select the Black and White Icon by clicking on B & W.
  3. Delete the entire icon by double clicking on the select tool on the left hand side » pressDelete, or select Edit » Cut.
  4. Using any of the drawing tools, draw the shape of the icon you want.  Whatever you draw here will be the final shape of your icon, which means that if you draw a circle, when you place your icon on another block diagram, it will appear as a circle.
  5. Change the other 16 Colors or 256 Colors icons as well.

Whatever changes you make to the 16 Colors and the 256 Colors icons, the shape of your icon will remain what you selected in the Black and White icon.

NOTE:  You can also just place just a dot on the Black and White icon.  Now when you make changes to your 16 Color icon and the 256 Color icon, there will be no extra white space.

24454iC1AC1CBDA3991CA3

 

Now design custom VI Icons of your own !!!!!!!

 

<<Kudos are welcome>>

Message 1 of 9
(4,618 Views)

Good one.. But cannot be used in applications as it needs to be formal...

 

Smiley Tongue

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 9
(4,598 Views)

Electro Sam,

 

it's a good thing that you have written the nugget. You should add a post with that information for the new icon editor which was introduced with LV 2009.

 

And to add something:

Normally, you should not use "random" icons using transparency. You should stick to the default size of 32x32 pixels. But there are cases where smaller icons come handy. Examples would be special error handler VIs, data transformation functions and alike.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 9
(4,589 Views)

Trim White Space.vi (in String group of Functions Palette) is a good example of a VI with a non 32x32 pixels icon.

 

24462iB9577673873ED53D

0 Kudos
Message 4 of 9
(4,574 Views)

And it's really not necessary to delete the black & white icon. It can be copied from the 16 or 256 color version.

 

 

0 Kudos
Message 5 of 9
(4,527 Views)

Tip:

 

Make sure whatever connector terminals you use on your subVI, you have a part of the icon covering the center of that connector (usually you can show the actual attachment point with an X).

 

Otherwise a wire could look like it is starting in empty space.

 

0 Kudos
Message 6 of 9
(4,511 Views)
0 Kudos
Message 7 of 9
(4,495 Views)

This information can also be found in the LabVIEW Help (search the Index for "icons" and then select "custom-shaped"), although there's no image in the Help, which would be more useful. There's also an example that ships with LabVIEW.

0 Kudos
Message 8 of 9
(4,494 Views)

Thanks I think I got it now.

 

Capture.PNGCapture.PNG

 

=====================
LabVIEW 2012


0 Kudos
Message 9 of 9
(4,098 Views)