Creating VS Code Projects for EXP

This article provides an overview of the process for creating VEX EXP projects in the VEX Visual Studio Code (VS Code) Extension. Projects in the VEX VS Code Extension can be created in two ways - by creating a new project from an example template or importing an existing VEXcode project.

Note: If this is your first time creating or importing projects in VS Code, you may need to enable additional permissions on your device for VS Code to work as intended.

Create a New Project in VS Code

VEX Robotics Extension icon in the VS Code Activity Bar is highlighted.

Launch Visual Studio Code on the computer. Select the VEX icon on the VS Code Activity Bar.

If the VEX icon does not appear, ensure you have installed the VEX extension. For steps to install this extension, see the following article that matches your device.

The VEX Robotics Extension has been selected and it shows two buttons in the Project Actions category, one button reads New Project and the other reads Import Project. The New Project button is highlighted.

Select the 'New Project' button under 'PROJECT ACTIONS' in the Primary Side Bar.

The New Project button has been selected, and VEX platform options are shown. The listed options include IQ (2nd gen), EXP, and V5. The EXP option is highlighted.

The Create a New VEX Project window will prompt. Select the EXP icon to select the Project Platform for the VEX EXP project.

The VEX Platform option has been selected, and now programming language options are shown. The listed options include Python and C/C++.

Choose either Python or C/C++ as the programming language and select the corresponding icon.

The programming language option has been selected, and now Template/Example projects are shown. This menu can be scrolled down to view the complete list of projects.

Next, select a Template or Example Project for creating the VEX EXP project.

  • Find the Template or Example Project by scrolling down or using the Search bar to filter the list of projects.
  • These Template and Example Projects contain sample code and/or robot configurations used to get the project started.

After selecting a Template or Example Project, select 'Create.'

The EXP Empty Template Project has been selected, and now the Project Name field is highlighted.

Next, set the Project Name, Description, and Location for the new project.

Type the name of the project in the text box under 'Project Name.'

Note: The project name will be used for the name of the top-level folder for the project. It also will be the name displayed on the EXP Brain's screen once the project has been downloaded to the robot. 

The EXP Empty Template Project with the Description field highlighted below the Project Name field.

Type the description of the project in the text box under 'Description.' This step is optional.

The EXP Empty Template Project with the Browse button highlighted to the right of the Location field.

If you want to save the project in a different location than the default project folder, scroll down the  window and select the 'Browse' button to choose the location for the project folder on the computer.

Note: The default project location is set to the default project folder found in the extension global settings.

The EXP Empty Template Project with the Create button highlighted in the bottom right corner.

Now that the Name, Description and Location have been entered, select the 'Create' button. The VS Code Window will begin refreshing.

The Explorer option on the Activity Bar has been selected and it shows the VEX project's files and folders. The folder titled src is highlighted.

The project for VEX EXP has now been created in the VEX VS Code Extension. To view and develop the project code, select 'src' under the project name in the Side Bar.

The Explorer option on the Activity Bar has been selected and it shows the VEX project's files and folders. The folder titled src has been opened, and inside a python file named main.py is highlighted.

Select 'main.py' (if the project is a Python project) or 'main.cpp' (if the project is a C/C++ project) under 'src' in the Side Bar.

The main.py file has been selected and now it is open in the Editor to the right.

The code of the selected Template or Example Project will be shown in the Editor area, where you can develop and edit the created project for VEX EXP.

Import an Existing VEXcode EXP Project

VEX Robotics Extension icon in the VS Code Activity Bar is highlighted.

Launch Visual Studio Code on the computer. Select the VEX icon on the VS Code Activity Bar.

The VEX Robotics Extension has been selected and it shows two buttons in the Project Actions category, one button reads New Project and the other reads Import Project. The Import Project button is highlighted.

Select the 'Import Project' button under 'PROJECT ACTIONS' in the Primary Side Bar.

Saved VEX projects are shown in the user's files in File Explorer. In this example, an EXP C++ project has been selected.

The Import Project window will open. Select the VEXcode EXP project file to import and click on the Open Button.

Note: The supported VEXcode project file types for VEX EXP are:

  • .expcpp (VEXcode EXP C/C++ project)
  • .exppython ( VEXcode EXP Python project)

The previously saved VEX project has been selected to be imported, and the user has options to edit its name and description before it is imported. In this example, the Project Name has been set to expVEXcode.

Next, set the Project Name, Description, and Location for the imported project.

By default, the name of the project will remain the same.

The EXP Project Import menu with the Description field highlighted below the Project Name field.

Type the description of the project in the text box under 'Description.' This step is optional.

The EXP Project Import menu with the Browse button highlighted to the right of the Location field.

If you want to save the project in a different location than the default project folder, scroll down the  window and select the 'Browse' button to choose the location for the project folder on the computer.

Note: The default project location is set to the default project folder found in the extension global settings.

The EXP Project Import menu with the Create button highlighted in the bottom right corner.

Now that the Name, Description and Location have been entered, select the 'Create' button. The VS Code Window will begin refreshing.

The Explorer option on the Activity Bar has been selected and it shows the VEX project's files and folders. The folder titled src is highlighted.

Once the VS Code window refresh is complete, the VEXcode EXP project has been imported into the VEX VS Code Extension. To view and develop the project code, select 'src' under the project name in the Side Bar.

The Explorer option on the Activity Bar has been selected and it shows the VEX project's files and folders. The folder titled src has been opened, and inside a C++ file named main.cpp is highlighted.

Select 'main.py' (if the imported project is a Python project) or 'main.cpp' (if the imported project is a C/C++ project) under 'src' in the Side Bar.

The main.cpp file has been selected and now it is open in the Editor to the right.

The code of the imported project will be shown in the Editor area, where it can be modified.

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

Last Updated: