Creating VS Code Projects for IQ (2nd generation)

This article provides an overview of the process for creating VEX IQ (2nd generation) 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

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, enhancing the educational experience for beginners in robotics.

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.

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robotics projects, aimed at enhancing educational experiences for beginners and educators.

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

Screenshot of the VS Code Extension for VEX IQ, showcasing the user interface and features designed to assist users in programming VEX IQ robots, including code editing, debugging tools, and project management options.

The Create a New VEX Project window will prompt. Select the IQ (2nd generation) icon to select the Project Platform for the VEX IQ (2nd generation) project.

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools for programming VEX IQ robots, designed to assist educators and students in enhancing their robotics projects and coding skills.

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

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, with highlighted options and menus relevant for educational robotics projects.

Next, select a Template or Example Project for creating the VEX IQ (2nd generation) 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.'

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to enhance programming for VEX IQ robotics projects, including code editing, debugging, and project management options.

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 IQ (2nd generation) Brain's screen once the project has been downloaded to the robot. 

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, with a focus on educational resources and beginner-friendly functionality.

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

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, with a focus on educational resources and beginner-friendly programming options.

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.

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, enhancing educational experiences and beginner robotics projects.

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

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robotics projects, with a focus on educational resources and beginner-friendly programming options.

The project for VEX IQ (2nd generation) 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.

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming and developing projects with the VEX IQ Robotics platform.

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.

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, with a focus on educational resources and beginner robotics.

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 IQ (2nd generation).

Import an Existing VEXcode IQ (2nd generation) Project

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, enhancing the educational experience for beginners in robotics.

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

Screenshot of the VS Code extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robotics projects, including code editing and debugging options.

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

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming and developing projects for the VEX IQ Robotics platform.

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

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

  • .iqcpp (VEXcode IQ C/C++ project)
  • .iqpython ( VEXcode IQ Python project)

Note: Only projects that are configured to use IQ (2nd generation) can be imported. If you try to import a VEXcode IQ project that is configured for IQ (1st generation), the import process will fail.

Screenshot of the VS Code extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, with a focus on educational resources and beginner-friendly programming options.

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

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

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to enhance programming for the VEX IQ Robotics platform, aimed at educators and students.

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

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, with a focus on educational resources and beginner-friendly functionality.

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.

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, enhancing educational experiences and beginner robotics projects.

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

Screenshot of the VS Code extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, enhancing educational experiences in robotics.

Once the VS Code window refresh is complete, the VEXcode IQ (2nd generation) 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.

Screenshot of the VS Code extension interface for VEX IQ, showcasing features and tools for programming VEX IQ robots, designed to assist educators and students in enhancing their robotics projects and coding skills.

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.

Screenshot of the VS Code Extension interface for VEX IQ, showcasing features and tools designed to assist users in programming VEX IQ robots, with an emphasis on educational resources and beginner-friendly functionality.

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: