Disabling and Enabling Blocks in VEXcode V5

VEXcode V5 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

Collage of various block designs and tutorials from V5, showcasing different styles and functionalities for users to explore and implement in their projects.

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

Screenshot showing the enable/disable toggle for blocks in V5, illustrating options for managing block functionality in the tutorial section.

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


What happens to individual blocks when disabled

Screenshot showing how to disable a feature in V5, with highlighted options and settings for users in the Blocks Tutorials section.

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 to the left, the robot will not wait after driving in reverse, but will immediately turn right.


What happens when a block with nested blocks is disabled

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. 

Illustration of a disabled block in Vex V5 programming, showing a greyed-out block with a warning symbol, indicating that the block cannot be used in the current context. Relevant for Blocks Tutorials in V5 Category Description.

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

Illustration showing a disabled block in VEX V5 programming, highlighting the visual representation of the block's inactive state for tutorial purposes.

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

Screenshot showing the process to enable block main settings in VEX V5 software, illustrating the interface and options available for users in the Blocks Tutorials section.

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 nested blocks in V5, illustrating the hierarchical structure and properties of blocks for tutorial purposes.

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


Disabling and enabling a single nested block

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.

Diagram illustrating the loop block functionality in V5 robotics programming, showing how loops can be nested within each other to control robot actions effectively.

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

Screenshot of the Enable Nest Context feature in VEX V5, illustrating the user interface and options available for configuring context settings in Blocks tutorials.

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

Screenshot showing the 'Before Disable a Hat' tutorial in V5, illustrating the steps to manage hats in the platform's block programming interface.

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


Disabling a “hat” block

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

Screenshot of a context menu displaying options related to V5 Blocks Tutorials, illustrating the available functionalities and settings for users working with VEX V5 programming.

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

Screenshot of a disabled edit option for the Hat Block in Vex V5 programming interface, illustrating the block's features and settings in the context of Blocks Tutorials.

The image below 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: