How to update a $-Parameter by ctrl script ?

Find and share HowTos to various installations / configurations!
2 posts • Page 1 of 1
Nicolas
Posts:2
Joined: Wed May 13, 2020 4:39 pm

How to update a $-Parameter by ctrl script ?

Post by Nicolas »

In an application , I have 2 views: a main view with a button calling the second view. On this button, with a script on the click action, I give 2 parameters: $P1:sytem, $P2:unit.

In the second view, I have to display 50 objects (based on the same reference object called "Motor" for example).

In the second viwe, instead of modifying each instance of my motor by giving the correct $-parameters, I would like to force each one by control-script using the $P1 and $P2 given by the previous panel. For example, the first instance will be $P1.$P2-1, the second one $P1.$P2-2 and so on.

Is it possible to force the $DP par script ?

Best regards

kilianvp
Posts:443
Joined: Fri Jan 16, 2015 10:29 am

Re: How to update a $-Parameter by ctrl script ?

Post by kilianvp »

You cannot assign a new value to a dollar parameter. Dollar parameters are read-only.

But you can simply pass on the dollar parameters.

Code: Select all

 ChildPanelOnCentral("example.pnl", "example", makeDynString("$P1:"+$P1, "$P2:"+$P2));
So for example you use "Example_motor" as $DP. And in your view with 50 parameter you build the full DP. For example: $DP+".on" wich results in Example_motor.on

2 posts • Page 1 of 1