Showing results for 
Search instead for 
Did you mean: 

Indirect Properties Not Supported for VI Scripting ?

Go to solution

While scripting around with the Property class (I'm building myself a scripting tool), I noticed it was not possible to set an indirect property (e.g. Control's "Label.Text" or "Terminal.Position") to a Property node using the "Set Properties[]" method.

Indeed the property "All Supported Properties" of the Property class only gives direct properties (e.g. "Label" or "Terminal").


For creating an indirect property, the workaround can be creating several cascading property nodes (e.g. a 1st prop node with Control->Label, then a 2nd for Text->Text), which is acceptable for my needs.


However I couldn't figure out how to get the path to the actual property in first place... meaning, from an existing prop node with e.g. "Label.Text", how to get the info that the actual property comes from "Label" ?


Obviously I could just copy/paste the already configured property node, but I would still want the info of the path to the indirect property...


Attached is an example to illustrate the problem.

0 Kudos
Message 1 of 3
Accepted by topic author raphschru

You can use this old deprecated property (it still works).  Send it dot-separated strings (e.g "Label.Text")


"If you weren't supposed to push it, it wouldn't be a button."
Message 2 of 3

Thanks ! As far as I've tested it works well !

I could even make it work with more complicated properties like Control's "Terminal.Wire.Label.Text".

I hope it will continue to work in the future though.


Here is my code modified with the solution :

0 Kudos
Message 3 of 3