My students are trying to use the desktop Vexcode app with Python to program V5 competition templates. They use the graphical “config” interface to add devices such as motors or controllers, and Vexcode then auto-generates the corresponding global variables and driver-control code. However, they often want to edit that auto-generated Python code directly (e.g. reversing the direction of a motor etc.). Vexcode seems to reset their changes to match the graphical interface anytime the file is saved, which is extremely confusing for them.
Is there a setting to turn off the automatically generated code for a particular .v5python file or a good workaround you would suggest for this issue?
If you create your own custom devices outside of the auto-generated region and they shouldn’t get replaced (I haven’t used v5 python before so I don’t know for sure). i.e., you set up the device configuration with the GUI (or just directly write it w/o the GUI) then copy/paste it outside of the auto generated part of the code, and it shouldn’t get messed up anymore. Make sure to remove the configuration from the GUI to make sure the devices don’t get defined twice though. They could also just make the changes they want to make using the GUI instead of text code to stop it from being overridden.