This works fine and all the options for configuring the BOM can be found here. Really awesome!
But when I am using my custom drawing frame that is referenced by
${KICAD_USER_TEMPLATE_DIR}\myframe.kicad_wks
with
I get the following error:
Loading main.kicad_pcb
E r r o r l o a d i n g d r a w i n g s h e e t . 2024-11-07 23:20:48,138 INFO Compressing pcb data
2024-11-07 23:20:48,287 INFO Dumping pcb data
KiCad places the template information in *.kicad_pro:
and this text variable doesn’t seem to be expanded.
Is there any other solution than giving the full file name in the page properties dialog?
The problem is that KiCad will automatically fill in the path variable instead of the file name when I select the template file by clicking on the folder symbol:
That popup comes from pcbnew, not from my code, I can’t disable it.
Are you running your bat file from where it is or from where the pcb file is? Try changing working directory in your bat file to the folder where the pcb file and .pro file are. Maybe that way the variable will be picked up.
Another thing you can try is define an environment variable KICAD_USER_TEMPLATE_DIR in your system or bat file, if I remember correctly kicad will parse env vars unless they are overriden in config. So if it can’t find the config then the env var may work.
After spending some time with the extensive user options I ended up with this line for calling iBom in my Windoze batch file for generating wonderful interactive HTML BOM.
I’d like to share it if anyone wants to play along at home: