Change Custom Property values depending on switches

Hey !

I have those 3 customs property right here.
image

I want them to change their values depending on the state of the switches bellow.
image

I guess that I have to script somewhere but I don’t know where.

Thanks !

What are the switches linked to ? Other custom properties ?
What behavior do you want to obtain ?

Seems to me that simple expression bindings would do the trick, but we need to know more about what you want to do.

I get the status of my switches in other custom properties.
image

I want for example that if the switch “Geneve” and “Eclairage” are true then the custom property
image
has a value of the addition of others properties that are linked to tags.
image

If you didn’t understand tell me.

Totaliser

Create an expression binding on PuissanceActiveTotale.

   {../PtotAuxGen.props.text} * {../toggleGeneve.props.selected}
 + {../PtotAuxMac.props.text} * {../toggleEclairage.props.selected}

The selector switch returns a True (1) or False (0) which multiplies the individual counts.

1 Like

Ok that’s a logic way to do it.

I guess it will work

Thank you very much for your help !