LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[All Objects] and [Controls] property node on a cluster...

Hi all,

Trying to solve a basic problem with property nodes, I found out a strange behaviour...

When a property node is made on a cluster, there is 2 ways of getting the references of all the objects inside the cluster : [All Objects] and [Controls]. They both return an array of references, but...

Run attached VI and please tell me why the references are NOT in the same order ? Smiley SurprisedSmiley SurprisedSmiley Surprised

Is there a good reason for this ? Is it a bug ?

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 1 of 13
(4,089 Views)
Hmmm,

Pushing my investigation a little bit further, I found out that in fact [Controls] gives references in the "cluster order" and [All Objects] gives references by date of creation of the control, starting by the most recently created... They are based on different  critera  to determine the order.

Also [All Objects] returns not only controls but also decorations.

Sorry, for the inconvenience... Please, ignore my previous post.

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 13
(4,076 Views)
Hi TiTou,
these properties are different: All Objects will also return references to Decorations.
I don't think there is a specific reason for the difference in order, anyway you should not make any code relying on similarities between the 2 properties: just use the property you really need.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 3 of 13
(4,076 Views)
You're right Paolo... I should only use the one I need...

But I wanted to understand why  orders are different, there IS a specific reason, and I found it Smiley Tongue


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 13
(4,074 Views)

Nice Q TiTou!

I played with this a little and I believe the "Controls" are returned in "cluster order" and the objects are in "layer order" (front to back).

What do you think?

Ben

While replying to this Q, my boss walked up and asked a Q. Next thing I know this subject is already settled!

Moral of the story: Ignore your boss and submit the answer (NOT) Smiley Wink

Message Edited by Ben on 03-31-2006 08:05 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 13
(4,068 Views)
Thanks Ben,

Are you sure it's "Layer order" ? As I said in the second post of the thread I thought it was "creation order" most recently created on top... Smiley Indifferent

Message Edité par TiTou le 03-31-2006 03:07 PM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 13
(4,064 Views)
I did a "Move to back" and changed the order.
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 13
(4,059 Views)
Correct... Sometimes I'd better keep my mouth silent ! Smiley Very Happy

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 8 of 13
(4,056 Views)

"It is better to remain silent and appear a fool than to open ones mouth and remove all doubt." (Proverbs ?) Smiley Wink

NO!

It questions like these that helps us all "explore new coners of the LabVIEW world".

Keep 'em coming Titou!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 9 of 13
(4,047 Views)
In fact, it seems that the order in All Controls is the "z-order", that is the vertical placement of controls/decorations: a given ctr/dec will be drawn over (on top of) all the other ctr/decs with greater index. This is interesting!

----------------------------------------------------------------------------------------------------------
It questions like these that helps us all "explore new coners of the LabVIEW world".

----------------------------------------------------------------------------------------------------------
Ben: "coners" may be badly translated, especially to French!Smiley Very Happy

Paolo

Message Edited by pincpanter on 03-31-2006 03:33 PM

Message Edited by pincpanter on 03-31-2006 03:33 PM

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 10 of 13
(4,043 Views)