Lesson 4: Tips and Tricks with VEXcode VR Python
This lesson contains a series of tips and tricks for you to utilize while using VEXcode VR Python.
- Describe how to adjust the font size in the Workspace and the benefits of doing so.
- Describe how to interpret an error message when a project will not run in VEXcode VR Python.
- Identify and describe how to use the built-in Help in VEXcode VR Python.
Adjusting Font Size in the Workspace
Changing the font size in VEXcode VR Python can be important for many reasons. For example, you may want your text to be easier to read, or you could be trying to get all of the code for a large project on your screen at once. The font size can be made larger, or smaller, incrementally, (or reset to the default size) using 'Adjust Font' in the 'Edit' menu.
- To make the font larger, select 'Edit' in the Toolbar. Then select 'Adjust Font', and 'Font Increase'. Repeat this process until the font size in the Workspace reaches your desired size.
- To make the font smaller, select 'Edit' in the Toolbar. Then select 'Adjust Font', and 'Font Decrease'. Repeat this process until the font size in the Workspace reaches your desired size.
- To reset the font size to its original size, select 'Edit' in the Toolbar. Then select 'Adjust Font', and 'Font Reset'. This will reset the font to its default size.
- This video clip shows how to increase the font by three increments, then decrease it, and finally reset it to its original size.
Error Messages When a Project Will Not Run
At times, you may have an error in your project that prevents it from running in VEXcode VR Python. That is ok! There are error messages and visual cues that you can use to help you troubleshoot in this scenario. For instance, you may have a misspelling, or a syntax error, like the extra colon (:) at the end of the first command in this project.
When you select 'Start' to test this project, the first thing that you will see is a grayed out VEXcode VR Python window, with a prominent error message.
Select 'OK' to return to VEXcode VR Python, so that you can troubleshoot your project. Here you will see a more detailed error message in the Print Console in the lower right corner of VEXcode VR Python. In addition, the line number in the Workspace with the error will be darkened.
Within the Print Console, you can identify the line number of the project that has the error, and the type of error that it is. In this case, line 33 has invalid syntax.
These cues can help you to identify the location and type of error, so that you can more easily correct it and run your project successfully.
Using the Built-in Help for Additional Support
You may also need to troubleshoot a project that can be executed by VEXcode VR, but does not run as you intended it to. To learn more about how each command or code element in the Toolbox functions within a project, the built-in Help is a great resource.
You can access the Help at any time while working in VEXcode VR Python by selecting the Help icon beside any command in the Toolbox. This video clip shows how to access Help, and hide the Help window when you are finished.
For more information about accessing Help in VEXcode VR Python, see this STEM Library article.