Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Icon Quick Drop

I would like to share with You my Set Icon quick drop. In the attachment, you can find the zip folder containing the whole project. The quick drop VI is named Set Icon.vi. In the attachment, you can also find Distribute.vi which should copy all the necessary files in the appropriate places (basically install this plugin). All files are in LabVIEW 2017.

 

The purpose of this plugin is to provide the fast way for creating VI icon containing VI name (in default mode). I prepared a custom font for this quick drop. Most of the characters are 4x5 pixels and some are even smaller so it is possible to squeeze in more text in the VI icon frame (I was unable to fit only 4 characters in 4x5 rectangle, these are: #, &, @ and ~). The font looks like this:

Font.jpg

 

This quick drop allows customization thanks to switches. Open any VI, press Ctrl+Space, type -? and press Ctrl+N to see Help Window:

Help.png

 

As you can see above, you can set VI name as icon text by default, but you can also set the text of your choice, with -n switch. You can also set separate header text with -h switch. In the example, when typing "-h head -n main text -c db" in the quick drop combo box, you will create a new icon which looks like this:

Icon.png

 

If you like the idea, please experiment with it and report bugs or suggest improvements.

Enjoy!

 

Edit:

I've added VIP file (QuickDrop installer). You may forget about Distribute.vi now 🙂

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
Message 1 of 6
(4,156 Views)

Backported to LV2016

Download All
Message 2 of 6
(4,108 Views)

I just tried this plugin, it's really cool! I have a few suggestions:

 

1. If the icon already has an NI_Library layer (i.e. if the VI is a member of a library or class), you should not overwrite the banner area of the icon.

2. Did you consider using the LabVIEW Icon API to write text to the Text Layer instead of creating a custom layer with the text as an image (i.e. not editable in the icon editor)? If you want to look into that avenue, the API is at vi.lib\LabVIEW Icon API. If you do go this route, I suggest Small Fonts, Size 8, centered, and Capitalize text. Of course all of these parameters could be overridden by typing in the QD text box like you currently support.

Message 3 of 6
(3,979 Views)

I like the suggestion to use the LabVIEW Icon API to write text to the Text Layer because that would make it substantially easier to make adjustments to the text.

Kosta
0 Kudos
Message 4 of 6
(3,884 Views)

I found the Distribute VI a bit awkward to use - I would prefer not to have to specify two paths. Consider using VI Package for distribution instead. If you want to keep Distribute VI, consider the following changes:

  1. Include Distribute VI in the zip file and replace the inputs with relative paths to the relevant content; that way the user only needs to click the run button.
  2. Reorganize the files in the zip file so the layout matches what's needed in <LabVIEW> directory structure. That will simplify the code in Distribute VI.
  3. Save every subVI programmatically, so the user doesn't get asked to do so if they are using a different version of LabVIEW.

Thank you!

Kosta
Message 5 of 6
(3,878 Views)

@Darren

1. During the development of this QD and later when I was using it (and after my colleagues tried it) I realized that it should be more customizable. Leaving NI_Library banner is not necessarily a thing I would like (I just use it differently) but I see how your idea might be useful for other users. I will add it to this project TODO list.

2. This QD previous version was using icon API and it was using only the text layer. But with the text layer, I was not able to use my font (which is not in a real font format). The real power of this QD, in my opinion, is this font. It is the most compressed and still readable text representation I could find. This font enables to have a lot more information in your icon than the text layer fonts. Also, I found that having simple images for a font is really simple to work with - if I found that '&' looks weird, I can just open one file in MS paint, fix some pixels and load it to my QD code.

 

@Kosta

1. The point of this QD is to not to use icon editor and to not to draw or click on anything. Just apply the usual QD workflow: Ctrl + Space > Type what you need. If you want to fix your text, type it again. You will end up with only little characters anyway.

2. You're right about Distribute VI, it is not necessarily the best tool. I just used it as a simple utility. I was not spending much time on it. I had some problems with VI Packages later before (it was not installing my QDs) so I decided to use some simple VI for distribution instead of doing it manually. I will try to cope with VI Packages problem and then I will get rid of Distribute VI.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 6 of 6
(3,817 Views)