Disabling and Enabling Blocks in VEXcode 123

VEXcode 123 allows users to disable and enable blocks within their projects. This is a useful feature for students when testing or debugging a project, so they do not have to take the project apart to figure out what is not working as intended. The user can disable or enable a block(s) to test and observe the differences in the robot’s behavior when that block is or is not in the project.


How to disable and enable blocks

Screenshot showing the steps to disable the menu in VEXcode VR, featuring a highlighted menu option and instructional text, relevant to the Block Tutorials section of the VEX Robotics overview.

In order to use the disable or enable blocks feature in VEXcode 123, the 123 Robot must be connected to your tablet or computer.

Disabling a block will keep it from being executed when the project is started. To disable a block, right-click or long-press on the block to activate the Context Menu, and then select Disable Block. The block will then appear grayed out with a grid of diagonal lines over it in the project.

Screenshot showing the process to enable the menu in VEXcode VR, illustrating the user interface elements and options available for accessing block tutorials in VEX Robotics.

To enable the block so that it is executed when the project is started, right-click or long-press on the disabled block to activate the Context Menu, and then select Enable Block.


What happens to individual blocks when disabled

Screenshot of a disabled block in VEXcode VR, illustrating a programming element that is currently inactive, part of the Block Tutorials section in the VEX Robotics and VEXcode VR Overview.

While a block(s) is disabled, it is shown grayed out with a grid of diagonal lines over it.

The disabled block is treated like a comment. It has no effect on the flow of the project, and will not be executed when the project is started.

In the example above, the 123 Robot will drive forward for 1 step and then stop; it will not turn.


What happens when a blocks with nested blocks is disabled

Screenshot of VEXcode VR block tutorial showing the 'Disable Stack' block, illustrating how to control the execution of blocks in a programming environment for VEX Robotics.

When you disable a block that has blocks nested within it, all of the blocks are disabled. Blocks like a loop or if-then-else conditional, that have nested blocks, can be disabled in the same way a single block can.

Right-click or long-press to activate the Context Menu of that loop or conditional Control block, and then select Disable Block.

Illustration of a disabled block in VEXcode VR, demonstrating how to indicate a block's inactive state in block-based programming tutorials for VEX Robotics.

The image shows what happens when the repeat loop is disabled. The loop and the two blocks inside of it were all disabled, and they all appear grayed out with a grid of diagonal lines over them.

Screenshot of VEXcode VR showing the 'Enable Stack' block tutorial, illustrating the interface and options available for programming in VEX Robotics.

In this example, nothing will happen when the project is started, as all of the blocks are disabled. You can enable the main block, and all nested blocks within it, by activating the Context Menu of the main block and selecting Enable Block.

Screenshot of VEXcode VR interface showing enabled blocks for programming in the Block Tutorials section of VEX Robotics overview.

When the main block is enabled, all nested blocks within it will also be enabled.

In this example, now that the main block is enabled, when the project is started, the 123 Robot will drive forward 1 step, then turn right for 90 degrees, and repeat these behaviors 4 times to drive in a square.


Disabling and enabling a single nested block

Screenshot showing the steps to disable the in-stack feature in VEXcode VR, illustrating the block tutorial process for VEX Robotics users.

You can disable a single block within a series of nested blocks, like a loop or if-then-else conditional, by following the same steps for disabling any other block: right-click or long-press to activate that block’s Context Menu and select Disable Block.

In this example, a single block within a loop is disabled.

Screenshot showing the steps to enable in-stack features in VEXcode VR, illustrating the interface and options available for users in the Block Tutorials section of VEX Robotics.

To enable that nested block, you will need to right-click or long-press to activate its Context Menu.

Screenshot showing the message 'Enable not an option' in VEXcode VR, illustrating a block tutorial related to VEX Robotics programming.

Note that the Context Menu for the main block (in this case the [Repeat] block) will not provide an option for enabling the nested block, because the main block itself was not disabled.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: