Stack#

The Switch Stack block is used to execute Switch Python commands typed within the open space of the block.

They are shaped to attach above or below other stack blocks.

Illustration of a Switch Stack block for executing Switch Python commands in a programming environment.

Select the open space of the block indicated in the image here and begin typing.

Illustration of a Switch Stack block for entering Switch Python commands in a programming environment.

Switch Stack blocks can be used for single lines of Switch Python commands or multiple lines.

In order for a Switch Stack block to function as intended, the Switch Python commands must be entered with the correct spelling, punctuation, and indentation. Refer to the Help of each block to see the matching Switch Python command.

In this example, the Drivetrain will move forward for 400 Millimeters.

Image of a Switch Stack block with a command to move the Drivetrain forward for 400 Millimeters.