Routerbus controls now have a setting that allows you to preset a source to be taken on command from a button (or any other control). Here’s a quick tour. You can download the example panel from here: Router Arm Take
Let’s see this in action first
Here’s our panel:
1 – RouterBus control
2 – Take button
3 – text label to show us the source on output 0
Select another source
We just clicked on Input 3, and now you can see it’s highlighted in a faded version of the active source showing that it is armed and ready to take.
Click the Take button
and the router switches to Input 3.
Now let’s see how this works behind the scenes…
RouterBus ArmAndTake property is set to True
The RouterBus is set up in the normal way and linked to the Router ( DUMMYRTR_1 in this case). To enable the Arm and Take feature you set the ArmAndTake property to True.
Take button script
The script for the Take button is a simple one-line command.