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

Obtain all properties from property node

Solved!
Go to solution

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 11
(888 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 11
(870 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 11
(863 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 11
(838 Views)

Re: Obtain all properties from property node

0 Kudos
Message 5 of 11
(833 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 11
(822 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 11
(810 Views)
Highlighted

Re: Obtain all properties from property node

allsupprop.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 8 of 11
(794 Views)
Solution
Accepted by topic author Kamilnd
07-20-2017 11:44 PM

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

Message 9 of 11
(621 Views)

Re: Obtain all properties from property node

Can someone tell me what function is this? thanks 

 Capture.PNG

0 Kudos
Message 10 of 11
(418 Views)