LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Scripting: Can't get or set all available properties

Solved!
Go to solution

As part of making a dialog for selecting, setting, and rearranging properties in a property node, I found that the scripting property that returns all available properties for an object, which looks like this:

script4.png

does not return the properties of items in the property list which are references and thus have their own properties, such as the caption, label, and terminal. Below you can see that the Caption property is of type reference, and this property is in the last of available properties, but in its flyout menu, it has a long list of properties of its own. These are not in the AllProps list of the original control. 

 

script1.png

Manually, you can select these properties, which are displayed in the form refname.property (eg, Label.Text) as seen here:

 

script3.png

If you want a list of displayed properties in a property node, there's a property for that, and it will return the displayed property names and unique IDs, including those for the Label.Text property in the node above

 

script2.png

Here's the problem. If you use a property ID returned by this function, and that ID it is not in the "AllProps" list, you get error 1077, and the set method does not work.

 

script5.png

So, my question is, is it possible to set a property like Label.text programatically?

 

And if so, the second question is, how can I get a complete list of properties that can be set? (I think that problem I can solve, since I have a reference and can use that to create a property node and get its properties. Gets messy, though.)

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 1 of 8
(2,251 Views)
Solution
Accepted by Hooovahh

You can set dotted properties, but it requires a deprecated property to do so. See here:

https://lavag.org/topic/20722-programmatically-set-a-property-item/

 

That discussion thread also has a link to an Idea Exchange post for retrieving all properties, including dotted properties. I suggest you kudo that Idea Exchange post if you haven't already.

Message 2 of 8
(2,232 Views)

Thank you Darren. 

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 3 of 8
(2,195 Views)

Hi Darren

 

Do you know how I can access those brown properties?

 

 

0 Kudos
Message 4 of 8
(538 Views)

@Senkaki wrote:

 

Do you know how I can access those brown properties?


Brown properties/methods are "private", i.e. not supported by NI. You can find out how to enable private properties/methods in LabVIEW with a google search.

0 Kudos
Message 5 of 8
(516 Views)

I have already performed that search.

In fact, I invite you to point out where NI has documented "SuperSecretPrivateSpecialStuff=True" parameter on their pages.

In any case, they have already solved the problem in another thread.

 

https://forums.ni.com/t5/LabVIEW/Internal-Private-Property-Nodes/m-p/4330447#M1268807

 

Thanks for your invaluable help,

JonA

0 Kudos
Message 6 of 8
(507 Views)

jcarmody_0-1695395905375.png

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 7 of 8
(500 Views)

I'm just having a bad day... 🙈

 

Have a nice weekend guys!

0 Kudos
Message 8 of 8
(488 Views)