ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Decoration labels

Solved!
Go to solution

If I show a decoration's Object Property dialog, a field named "Label" appears where I can type text in (LV2011). There's also a "Visible" check box above it.

However, the check box keeps to be disabled even if I put some text in the label, furthermore the text is not retained when I close the dialog.

On the other side, a decoration property node will not show any "Label" item.

What this field is good for?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 1 of 14
(7,834 Views)

pincpanter wrote:

What this field is good for?


Probably nothing. The Decoration class, if memory serves, inherits from Generic, which does not have a Label property. I'm guessing this is just an oversight in the dialog where no one thought to hide that field. I didn't even notice that you can open the properties dialog for a decoration.


___________________
Try to take over the world!
Message 2 of 14
(7,829 Views)

That's a pity. I did hope to use that Label to identify decorations. Indexing the Decorations[] array it's uncomfortable and prone to errors.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 14
(7,824 Views)
Solution
Accepted by pincpanter
  1. Vote for this idea - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-Explicit-Decoration-References-to-LabVIEW/idi-p/97...
  2. Use this RCF plugin (or adapt it to be a QD shortcut) - https://decibel.ni.com/content/docs/DOC-6496

___________________
Try to take over the world!
Message 4 of 14
(7,795 Views)

Thanks for the links. In the meantime, I have written a "decoration managing" vi that may be useful to show decoration indexes and easily hide/show them.

BTW: for a label decoration the Label field matches the decoration text.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 5 of 14
(7,760 Views)

Just put a floating label next to the decoration, then group them.

0 Kudos
Message 6 of 14
(7,744 Views)

What I would like to do is to show/hide and possibly move decoration programmatically. For this, I need to know the position (index) of each decoration in the Decorations[] reference array.

That index may change when you move objects forward or backward in the FP. Hence the need of a method to find the index quickly.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 7 of 14
(7,725 Views)

I would assume the index doesn't change, but i haven't tested it. Z-property doesn't change index of controls, to my knowledge, only tab-order.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 14
(7,720 Views)

Yamaeda ha scritto:

I would assume the index doesn't change, but i haven't tested it. Z-property doesn't change index of controls, to my knowledge, only tab-order.

/Y


The index does change indeed following the Z order. You may check it quickly using my vi.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 9 of 14
(7,717 Views)

Hmm, what if you turn the decoration references to Variants and add use Set Attribute? Then you have something to search for.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 10 of 14
(7,710 Views)