Switching/observing the Primary device on a track.

Post Reply New Topic
RELATED
PRODUCTS

Post

Building a script for someone, and I am attempting to step through the devices on a track assigning the device as the primary device as I step through them.

I have been able to do this using

primaryDevice.switchToDevice(DeviceType.ANY, ChainLocation.NEXT)

But I haven't been able to get the observer to work:

addCanSwitchToDeviceObserver (DeviceType deviceType, ChainLocation chainLocation, Callable callback)

It doesn't through errors, I just don't get any info. The idea is to observe this, and if I can't go to the next device, I go back to the first.

Is there another way to do this? Am I missing something obvious?

Post

Never mind! Figured out another (better) way of doing it.
By the way though, I couldn't get the ChainLocation.FIRST to work in the switchToDevice method. It just wouldn't move the primary device.

Post Reply

Return to “Controller Scripting”