realthunder / fcad_pcb

FreeCAD scripts for PCB CAD/CAM
MIT License
126 stars 25 forks source link

the script does not support the KICAD_CONFIG_HOME enviroment variable #11

Closed MitjaNemec closed 5 years ago

MitjaNemec commented 5 years ago

in kicad.getKicadPath() the script assumes the configuration is in the root folder of %APPDATA%/kicad.

But since Kicad V5, you can also have environment variable KICAD_CONFIG_HOME, which can point to a folder within this folder. This makes it possible to have V4 and V5 installations concurrently.

So by default your script uses V4 configuration. As proper step support is available in V5 (in libraries as well as in KiCad) I'd prefer to use V5 configuration by default if both of them exist, but this is an advanced issue, so not many users should be affected, and I patched my version, just thought I should report this.

realthunder commented 5 years ago

Thanks for the heads up. I have modified to look for this env by default. To directly specify the part's directory ( (KISYS3DMOD path, not the config path), you can use keyword 'part_path' when creating KicadFcad instance, or use a different environment variable with keyword 'path_env'.