LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Icon Template - Text Lines won't center vertically - LV21

Solved!
Go to solution

Hello,

I am making an Icon template and this is not my first time.  However, this is my first time using LV21.  Is this a bug?  Cuz I could have sworn I was always able to make this work in the previous versions of LabVIEW without issue.  Someone please tell me where I am going wrong.

 

Step 1: Select Generic _blank template

DailyDose_0-1649450495733.png

 

Step 2: Delete VI Icon layer

DailyDose_1-1649450548200.png

DailyDose_2-1649450559795.png

 

Step 3: Edit however you want it to be

DailyDose_3-1649450783441.png

 

Step 4: Make sure the words still center vertically

DailyDose_4-1649450852637.png

 

Step 5: Save Template (make sure you delete the test words)

DailyDose_5-1649450906085.png

 

DailyDose_6-1649450928927.png

 

Step 6: Reload Templates and select your new template you just made

DailyDose_7-1649451235941.png

 

Step 7: Delete the generic user layer

DailyDose_8-1649451298343.png

 

DailyDose_9-1649451309103.png

 

Step 8: Type Words Describing VI

DailyDose_10-1649451396749.png

 

Step 9: Someone on NI Forums tell me where I messed up and why the words won't center vertically in the blue section.  Thank you!

Message 1 of 25
(2,166 Views)

The issue is that in the latter part, it considered your whole image as such and could not identify any borders to center the text vertically.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 25
(2,146 Views)

@santo_13 wrote:

The issue is that in the latter part, it considered your whole image as such and could not identify any borders to center the text vertically.


I appreciate the response. I do. But... How then do I help it identify borders? What did I not do that needs doing?

0 Kudos
Message 3 of 25
(2,136 Views)

Perhaps not the exact solution you are looking for but if you use classes to create your VIs, it does all this for you automatically. So if you made a class called COMPNY, you can edit the class icon then all the VIs made in that class will automatically have the COMPNY header already on the VI icon so all you have to do is add the VIs text under the header where it will be centered and look nice.

compny.jpg

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 4 of 25
(2,132 Views)

Tried the same on LV2019, and it seems to work just fine, a possible bug.

 

santo_13_0-1649476309765.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 5 of 25
(2,131 Views)

Wow, who would've thought that after at least a decade of leaving the icon editor alone, someone would change something and break it?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 25
(2,119 Views)

Ouch!  I'm feeling guilty.

 

     When LabVIEW 2015 was released, there was a "hidden feature" that I was privileged to participate in that provided access to what was released in LabVIEW 2016 as "Asynchronous Channel Wires", a feature I absolutely adored and continue to use heavily.  In my mind, the two "developers" of this feature were Jeff Kodosky and Stephen Loftus-Mercer, the Fathers of LabVIEW and LVOOP, respectively.

 

     I noticed that Stephen had created an Icon for one of his "Asychronous Loops Managed by Channel Wires" that looked like this:

SL-M Async Loop.png

I loved the idea of a "While Loop" Icon to identify parallel asynchronous loops, with Channel Wires bringing data in and out, but I wanted a little more "real-estate" inside the loop, so I made an Icon that had thinner lines (double instead of triple thick lines) that looked like this:

BS Async Loop.png

That worked fine.  I'd already made a small Icon Library for myself that were similar to the VI Icon in the "Frameworks" folder that ships with LabVIEW, so I put my double-thick center-colored Icon in the Icon Template folder, and tried it out.

 

It was a complete disaster!  When I tried to use it, and put text in the big "space in the middle", it tried to place it between the two lines making up the bottom edge of the Icon.  [I'm not going to show you an ugly picture of this ...].  I remember trying to bring this to NI's attention (I know I button-holed several of the developers at NI-Week in 2016 or 2017), but nothing came of it.  For myself, I "fixed" the problem by making my Icon look like this:

LOOP Host.png

This is the Icon template that I used to make the Icon above -- if you look carefully, you will see that the Icon template has only a single line at the bottom.  I deduced (by experimenting) that what the Icon Editor was doing was looking for horizontal lines in the Template.  If it found three (or more) (like the Frameworks "VI" Icon), it put all of the Icon Text between the two lowest lines.  I suggested that a better algorithm would be to look for the largest "space" between horizontal lines in the Template for the Icon Text.

 

But nothing happened.  I hope this wasn't a "fix" for the issue I raised five years ago ...

 

Bob Schor

 

P.S. -- I'm still using my Icon set.  They seem to work fine in LabVIEW 2021, but I haven't been using this version much except to respond on the Forums, as my colleagues are all running LabVIEW 2019, so I'm "being compatible" until we get a big Project out the door ...

 

Bob Schor

Message 7 of 25
(2,108 Views)

@Bob_Schor wrote:

Ouch!  I'm feeling guilty.

 

     When LabVIEW 2015 was released, there was a "hidden feature" that I was privileged to participate in that provided access to what was released in LabVIEW 2016 as "Asynchronous Channel Wires", a feature I absolutely adored and continue to use heavily.  In my mind, the two "developers" of this feature were Jeff Kodosky and Stephen Loftus-Mercer, the Fathers of LabVIEW and LVOOP, respectively.

 

     I noticed that Stephen had created an Icon for one of his "Asychronous Loops Managed by Channel Wires" that looked like this:

SL-M Async Loop.png

I loved the idea of a "While Loop" Icon to identify parallel asynchronous loops, with Channel Wires bringing data in and out, but I wanted a little more "real-estate" inside the loop, so I made an Icon that had thinner lines (double instead of triple thick lines) that looked like this:

BS Async Loop.png

That worked fine.  I'd already made a small Icon Library for myself that were similar to the VI Icon in the "Frameworks" folder that ships with LabVIEW, so I put my double-thick center-colored Icon in the Icon Template folder, and tried it out.

 

It was a complete disaster!  When I tried to use it, and put text in the big "space in the middle", it tried to place it between the two lines making up the bottom edge of the Icon.  [I'm not going to show you an ugly picture of this ...].  I remember trying to bring this to NI's attention (I know I button-holed several of the developers at NI-Week in 2016 or 2017), but nothing came of it.  For myself, I "fixed" the problem by making my Icon look like this:

LOOP Host.png

This is the Icon template that I used to make the Icon above -- if you look carefully, you will see that the Icon template has only a single line at the bottom.  I deduced (by experimenting) that what the Icon Editor was doing was looking for horizontal lines in the Template.  If it found three (or more) (like the Frameworks "VI" Icon), it put all of the Icon Text between the two lowest lines.  I suggested that a better algorithm would be to look for the largest "space" between horizontal lines in the Template for the Icon Text.

 

But nothing happened.  I hope this wasn't a "fix" for the issue I raised five years ago ...

 

Bob Schor

 

P.S. -- I'm still using my Icon set.  They seem to work fine in LabVIEW 2021, but I haven't been using this version much except to respond on the Forums, as my colleagues are all running LabVIEW 2019, so I'm "being compatible" until we get a big Project out the door ...

 

Bob Schor


Is this the infamous "vertical line" issue?  I forget exactly what it was - I haven't run into it lately because I haven't made an icon with a custom format in a while, but I seem to remember something about horizontal lines and strange vertical alignment.

 

Edit: nvm, I read your detailed description a couple of times and yes, this is exactly it.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 25
(2,071 Views)

Your mistake is in using words in icons to describe VIs.  I consider that a hideous practice.  (But it is better that what my cow-orkers do; which it not to edit the icons at all and just use the default.)

 

As for a common component in a group of VIs, I don't use templates, I put the VIs in a .lvlib and then make flag icon for the library.  Here are a few of my lib flags:

paul_cardinale_1-1649602222876.png   Test Framework

paul_cardinale_2-1649602278656.png   Deployer

paul_cardinale_3-1649602331385.png   Wizard

paul_cardinale_4-1649602385008.png   Upconverter

paul_cardinale_5-1649602437998.png   Quick Apps

paul_cardinale_6-1649602683889.png   Universal Dialog Box

 

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 9 of 25
(2,029 Views)

@paul_cardinale wrote:

Your mistake is in using words in icons to describe VIs.  I consider that a hideous practice.  (But it is better that what my cow-orkers do; which it not to edit the icons at all and just use the default.)

 

As for a common component in a group of VIs, I don't use templates, I put the VIs in a .lvlib and then make flag icon for the library.  Here are a few of my lib flags:

paul_cardinale_1-1649602222876.png   Test Framework

paul_cardinale_2-1649602278656.png   Deployer

paul_cardinale_3-1649602331385.png   Wizard

paul_cardinale_4-1649602385008.png   Upconverter

paul_cardinale_5-1649602437998.png   Quick Apps

paul_cardinale_6-1649602683889.png   Universal Dialog Box

 

 


I'm willing to wager that your opinion is in the minority (even though it is sound advice).  The fact that the icon text editor seems somehow broken now has the potential to affect a lot of people.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 25
(2,018 Views)