cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Obtain all properties from property node

Highlighted

Obtain all properties from property node

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 9
(318 Views)

Re: Obtain all properties from property node

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
CLAD, using 2009SP1 + LV2011SP1 + LV2017 on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 2 of 9
(300 Views)

Re: Obtain all properties from property node

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 9
(293 Views)

Re: Obtain all properties from property node

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 9
(268 Views)

Re: Obtain all properties from property node

0 Kudos
Message 5 of 9
(263 Views)

Re: Obtain all properties from property node

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

0 Kudos
Message 6 of 9
(252 Views)

Re: Obtain all properties from property node

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
CLAD, using 2009SP1 + LV2011SP1 + LV2017 on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 7 of 9
(240 Views)

Re: Obtain all properties from property node

allsupprop.png

Message 8 of 9
(224 Views)

Re: Obtain all properties from property node

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

0 Kudos
Message 9 of 9
(51 Views)