LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtain all properties from property node

Solved!
Go to solution

Hi, i have a problem with property node. I want to take all properties like Value, Visible and write to an array. Can i do something like that ?

0 Kudos
Message 1 of 12
(5,944 Views)

Hi Kamilnd,

 

Can i do something like that ?

Yes.

You need to read all properties and store them in an array.

 

Maybe you need to convert some values to strings before building that array.

Maybe you could use a cluster instead of an array…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(5,926 Views)

No. See the definition of arrays. The elements of an array must be the same data type! So for example, you cannot store the "Visible?" and "Value" properties of a numeric control in the same array. The first property is a Boolean type, the second is a Double numeric data type.

 

But what you can do is to create a type defined cluster to store those values which you want:

 

properties.png

 

Edit: or as GerdW suggested, you could "Flatten to String" all the properties, then store it in an array. But a cluster is much easier to handle, using the Bundle/unbundle by names. Using arrays you can make mistakes more easy, and you need to keep track which property you store at which index of the array...

0 Kudos
Message 3 of 12
(5,919 Views)

Sorry i asked a wrong question. I want to get all names of property and write to an array, how can i do that?

0 Kudos
Message 4 of 12
(5,894 Views)
0 Kudos
Message 5 of 12
(5,889 Views)

yeah, i know about that, but i want to do this dynamically not static.

0 Kudos
Message 6 of 12
(5,878 Views)

Hi Kamilnd,

 

i know about that, but i want to do this dynamically not static.

Then also read the properties for specific controls from the LabVIEW help.

When there is a reference to some control in your VI you need to determine its specific type, then get the corresponding properties from the list in the LabVIEW help.

 

Why do you need to determine property names of a control at runtime???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 12
(5,866 Views)

allsupprop.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 8 of 12
(5,850 Views)
Solution
Accepted by topic author Kamilnd

I've done this before when I needed to get a list of properties a given .NET node had.  Here's basically what I did:

 

Find all possible properties.png

Message 9 of 12
(5,677 Views)

Can someone tell me what function is this? thanks 

 Capture.PNG

0 Kudos
Message 10 of 12
(5,474 Views)