cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

Indirect Properties Not Supported for VI Scripting ?

Resolvido!
Ir para a solução

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
Mensagem 1 de 3
2.653Exibições
Solução
Aceita pelo autor do tópico raphschru

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

dp.png

"If you weren't supposed to push it, it wouldn't be a button."
Mensagem 2 de 3
2.602Exibições

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
Mensagem 3 de 3
2.592Exibições