SOLVED: SwitchTOP Class : Add a "length" property

Hello,
I’m using a button with a CountCHOP to toggle different inputs in a SwitchTOP. I would like to set the CountCHOP limitmax to the number of inputs in SwitchTOP - 1, referencing a property.
Do you have an idea on how to work around this, or would it be possible to add a “length” property that contains the count of available inputs in the SwitchTOP?

Thanks !

Hi,

the python expression:

len(op('switch1').inputs)

returns the number of inputs into a switchTOP named ‘switch1’

1 Like

Thansk @flowb !