Creating VS Code Projects for VEX IQ (2nd gen)

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

Creating a new project for VEX IQ (2nd gen)

  • Launch Visual Studio Code on the computer. Click on the VEX icon on the VS Code Activity Bar.
    iq-image1.png
  • Click on the New Project Button under PROJECT ACTIONS in the Primary Side Bar.
    iq-image2.png
  • The Create a New VEX Project window will prompt. Click on the IQ 2nd Generation icon to select the Project Platform for the VEX IQ (2nd gen) project.
    iq-image3.png
  • Select Python or C/C++ as the Project Language. Click on the Python icon to choose Python as the programming language for the VEX IQ (2nd gen) project, or click on the C/C++ icon to choose C/C++.
    iq-image4.png
  • Select a Template/Example Project for creating the new VEX IQ (2nd gen) project. 
    • Find the Template/Example Project by rotating the Mouse Scroll Wheel, dragging the slider of the Scrollbar, or using the Search Bar to filter the list of sample projects. 
    • Click on the icon of the appropriate Template/Example Project.
      Note: The Template/Example Project contains sample code and robot configuration that is used to get the project started.
      iq-image5.png
  • Set the Project Name, Description, and Location for the new VEX IQ (2nd) gen 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 will also be the name displayed on the VEX device screen once the application has been downloaded to the robot. 
      iq-image6.png
    • (Optional) Type the description of the project in the Text Box under Description.
      Note: The project description will also be displayed on the device’s screen under the project information. 
      iq-image7.png
    • (Optional) If you want to save the project in a different location than the default project folder, scroll down the Create a New VEX Project window and click on the Browse Button to select 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.
      iq-image8.png
    • Click on the Create button to create the project. The VS Code window will start refreshing.
  • Once the VS Code window refresh is complete, the project for VEX IQ (2nd) gen is created in the VEX VS Code Extension. To view and develop the project code, click on src under the project name in the Side Bar.
    iq-image9.png
  • Click on 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.
    iq-image10.png
  • The code of the selected Template/Example Project will be shown in the Editor area, where we can develop and edit the created project for VEX IQ (2nd gen).
    iq-image11.png

Import an existing VEXcode IQ (2nd gen) project

  • Launch Visual Studio Code on the computer. Click on the VEX icon on the VS Code Activity Bar.
    iq-image12.png
  • Click on the Import Project Button under PROJECT ACTIONS in the Primary Side Bar.
    iq-image13.png
  • The Import Project window will prompt. 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 the projects that are configured to use IQ (2nd gen) can be imported. If you try to import a VEXcode IQ project that is configured for IQ (1st gen), the import process will fail.
    iq-image14.png
  • Set the Project Name, Description, and Location for the imported project.
    • (Optional) If you want to change the name of the imported project, type the new 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 will also be the name displayed on the VEX device screen once the application has been downloaded to the robot.
      iq-image15.png
    • (Optional) Type the description of the project in the Text Box under Description.
      Note: The project description will also be displayed on the device’s screen under the project information. 
      iq-image16.png
    • (Optional) If you want to save the project in a different location than the default project folder, click the Browse Button to select 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.
      iq-image17.png
    • Click on the Import button to import the project. The VS Code window will start refreshing.
  • Once the VS Code window refresh is complete, the VEXcode IQ project is imported into the VEX VS Code Extension. To view and develop the project code, click on src under the project name in the Side Bar.
    iq-image18.png
  • Click on 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.
    iq-image19.png
  • The code of the imported project will be shown in the Editor area, where we can modify or remix the imported project for VEX IQ (2nd gen).
    iq-image20.png

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

Last Updated: