Extracting VCS files

I was curious to see if I could extract *.vex files and insert additional tabs myself since the VCS Tab manager isn’t released yet. I didn’t figure out how to do that, but I did discover by using an online file type checker that the VCS files are really tar files. I changed the file name and extracted it and was met with a single file named “ThIsisATemPoRaRyFiLE.json”. Here is what the json for my VEX C++ project contained:


{"title":"Programming Junk","description":"Justin's useless junk","version":"0.0.1","icon":"USER000x.bmp","competition":true,"files":{"robot-config.h":"dXNpbmcgbmFtZXNwYWNlIHZleDsKdmV4OjpicmFpbiBCcmFpbjsKdmV4Ojptb3RvciBNb3RvcjEgKHZleDo6UE9SVDEsIHZleDo6Z2VhclNldHRpbmc6OnJhdGlvMThfMSxmYWxzZSk7CnZleDo6dmlzaW9uOjpzaWduYXR1cmUgU0lHXzEgKDEsIDAsIDAsIDAsIDAsIDAsIDAsIDIuNSwgMCk7CnZleDo6dmlzaW9uOjpzaWduYXR1cmUgU0lHXzIgKDIsIDAsIDAsIDAsIDAsIDAsIDAsIDIuNSwgMCk7CnZleDo6dmlzaW9uOjpzaWduYXR1cmUgU0lHXzMgKDMsIDAsIDAsIDAsIDAsIDAsIDAsIDIuNSwgMCk7CnZleDo6dmlzaW9uOjpzaWduYXR1cmUgU0lHXzQgKDQsIDAsIDAsIDAsIDAsIDAsIDAsIDIuNSwgMCk7CnZleDo6dmlzaW9uOjpzaWduYXR1cmUgU0lHXzUgKDUsIDAsIDAsIDAsIDAsIDAsIDAsIDIuNSwgMCk7CnZleDo6dmlzaW9uOjpzaWduYXR1cmUgU0lHXzYgKDYsIDAsIDAsIDAsIDAsIDAsIDAsIDIuNSwgMCk7CnZleDo6dmlzaW9uOjpzaWduYXR1cmUgU0lHXzcgKDcsIDAsIDAsIDAsIDAsIDAsIDAsIDIuNSwgMCk7CnZleDo6dmlzaW9uIFZpc2lvbjEgKHZleDo6UE9SVDExLCA1MCwgU0lHXzEsIFNJR18yLCBTSUdfMywgU0lHXzQsIFNJR181LCBTSUdfNiwgU0lHXzcpOwp2ZXg6OnZpc2lvbjo6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++"},"components":{"name":"Controller1","class":"vex::controller","left":439,"top":51,"type":"controller"},{"name":"Controller2","class":"vex::controller","left":757,"top":17,"type":"controller"},{"name":"Motor1","class":"vex::motor","port":"1","left":11,"top":376,"type":"motor","data":{"gears":200,"reversed":false}},{"name":"Vision1","class":"vex::vision","port":"11","left":331,"top":379,"type":"vision","data":{"brightness":50,"signatures":{"name":"SIG_1","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_1"},"range":2.5},{"name":"SIG_2","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_2"},"range":2.5},{"name":"SIG_3","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_3"},"range":2.5},{"name":"SIG_4","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_4"},"range":2.5},{"name":"SIG_5","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_5"},"range":2.5},{"name":"SIG_6","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_6"},"range":2.5},{"name":"SIG_7","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_7"},"range":2.5}],"codes":]}},{"name":"Vision2","class":"vex::vision","port":"12","left":572,"top":376,"type":"vision","data":{"brightness":50,"signatures":{"name":"SIG_1","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_1"},"range":2.5},{"name":"SIG_2","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_2"},"range":2.5},{"name":"SIG_3","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_3"},"range":2.5},{"name":"SIG_4","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_4"},"range":2.5},{"name":"SIG_5","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_5"},"range":2.5},{"name":"SIG_6","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_6"},"range":2.5},{"name":"SIG_7","parameters":{"uMin":0,"uMax":0,"uMean":0,"vMin":0,"vMax":0,"vMean":0,"rgb":0,"type":0,"name":"SIG_7"},"range":2.5}],"codes":]}},{"name":"Gyro1","class":"vex::gyro","port":"A","left":853,"top":411,"type":"gyro"},{"name":"Accelerometer1","class":"vex::accelerometer","port":"B","left":1047,"top":400,"type":"accelerometer"}]}

I found the files in this folder: ~/AppData/Local/Vex Coding Studio/Vex Coding Studio/sdk/user. But it does not create new files for each program you create so its not very useful. Hopefully there will be a good solution for VCS.

I did notice there is a “version” section on the drop-down box where you save/load programs.

Another possibility I only barely looked into a little is to track down where the libraries are stored and create your own files where those are stored, files to be included in main.

That directory seems to be a place for the files to temporarily be extracted to for compilation; They are then overwritten each time compilation is performed.

I wonder if it would be possible to modify the makefile?

I edited the INC section of the makefile and added another directory which contained a .h and .cpp file for a class that I made. I was able to include both files and use the class and it compiled.

I just don’t know if it would actually work because I don’t have a v5 brain yet :frowning:

probably not.
VCS is not showing linker errors yet.
A VCS update will overwrite any files you modify in the application support area.