Disabling and Enabling Blocks in VEXcode VR

VEXcode VR allows users to disable and enable blocks within their projects. This is a useful feature for testing or debugging a project without having to take the project apart. The user can disable or enable a block(s) to test the differences in the robot’s behavior when that block is or is not in the project.


How to disable and enable blocks

Screenshot of VEXcode VR interface showing the disable/enable options for a virtual robot, illustrating the platform's block-based coding features for teaching coding concepts in STEM education.

To disable a block, right-click or long-press on the block to activate the Context Menu and then select Disable Block.

Screenshot of the context menu in VEXcode VR, showcasing options for coding and robot control, designed to assist users in programming within the virtual environment.

To enable a disabled block, activate the Context Menu for that block and select Enable Block. 


What happens to individual blocks when disabled

Image of a disabled individual using VEXcode VR, an online programming environment for learning coding concepts through a virtual robot, showcasing accessibility in STEM education.

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.

In the example project, the robot will not wait after driving in reverse, but will immediately turn right.


What happens when a block with nested blocks is disabled

Screenshot showing the 'Nested Blocks' feature disabled in VEXcode VR, illustrating the block-based coding interface for programming a virtual robot.

When you disable a block with 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. 

Activate the Context Menu of that loop or conditional Control block, and then select Disable Block. 

Screenshot of VEXcode VR interface showing the 'Repeat' block disabled, indicating that it cannot be used in the current programming context. This image supports tutorials for learning coding concepts with a virtual robot.

This image shows what happened when the repeat loop was disabled. The loop and the two blocks inside of it were all disabled.

Screenshot showing the VEXcode VR interface with the main block enabled, illustrating the block-based coding environment used for programming virtual robots in educational settings.

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 showing a disabled main block in the block-based coding interface, illustrating the programming environment for learning coding concepts with a virtual robot.

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


Disabling and enabling a single nested block

Screenshot of VEXcode VR interface showing options for disabling and enabling features, illustrating the block-based coding environment for programming a virtual robot in a tutorial context.

You can disable single blocks within a loop or if-then-else by following the same steps for disabling any other block: activate that block’s Context Menu and choose Disable Block.

Here is an example of only disabling a single block within a loop.

VEXcode VR context menu interface showing options for programming a virtual robot, designed for educational purposes in coding and robotics, featuring both block-based and text-based coding options.

The Context Menu for the main block will not provide an option for enabling the nested block because the main block was not disabled.

Diagram illustrating the nested block context in VEXcode VR, an online programming environment for learning coding concepts through a virtual robot, featuring block-based and text-based coding options.

If later you want to enable that nested block, you will need to activate its Context Menu.


Disabling a “hat” block

Screenshot of the VEXcode VR interface showing the 'Disable Hat' feature, designed to help users learn coding concepts through a virtual robot in a block-based coding environment.

You can disable an entire stack of blocks by disabling the “hat” block that contains them all.

Activate the Context Menu of the “hat” block, and then select Disable Block.

Screenshot of a VEXcode VR tutorial showing a block-based coding interface with a disabled hat feature, illustrating programming concepts for virtual robots in an educational setting.

This image shows what happened when the When Started “hat” block is disabled. All of the blocks contained under the When Started block will not run.

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

Last Updated: