The following templates are stored in the kicad_helpers/templates folder and are included with the python package by adding graft kicad_helpers/templates
to the MANIFEST.in file:
This function is available as a command line script:
> kh_add_badges --help
This function is available as a command line script:
> kh_update --help
> kh_update --v --overwrite
This function can also be called via a command line script:
> kh_sch_to_bom --help
Running kh_sch_to_bom
within your project dictory will generate a BOM file (e.g., manufacturing/default/project-name-BOM.csv
) by extracting fields from the KiCad schematic file (e.g., project-name.sch
).
> kh_sch_to_bom --v
Here's an example of a BOM extracted from a KiCad schematic.
This function can also be called via a command line script:
> kh_bom_to_sch --help
Running kh_bom_to_sch
within your project dictory will read the BOM file (e.g., manufacturing/default/project-name-BOM.csv
), and import the fields back into the KiCad schematic file (e.g., project-name.sch
).
> kh_sch_to_bom --v
This function can also be called via a command line script:
> kh_export_man --help
Running kh_export_man
within your project directory will export manufacturing outputs (e.g., gerber, drill, and position files).
> kh_export_man --output outputs
> tree outputs
You can generate manufacturer-specific outputs using the --manufacturer
flag, e.g.:
> kh_export_man --manufacturer PCBWay --output outputs
Support for additional manufacturers can be added by creating a *.yaml
file in the .kicad_helpers_config/manufacturers directory.
This function can also be called via a command line script:
> kh_export_sch --help
Export the schematic(s) as a pdfs:
> kh_export_sch --ext pdf --output outputs
> tree outputs
Export the schematic(s) as svgs:
> kh_export_sch --ext svg --output outputs
> tree outputs
This function can also be called via a command line script:
> kh_export_pcb --help
Export the board layout as pdfs:
> kh_export_pcb --ext pdf --output outputs
> tree outputs
Export the board layout as svgs:
> kh_export_pcb --ext svg --output outputs
> tree outputs
This function can also be called via a command line script:
> kh_run_erc --help
The ERC report is printed to stdout
and can be redirected to a file:
> kh_run_erc > erc_report.txt
> cat erc_report.txt
This function can also be called via a command line script:
> kh_run_drc --help
The DRC report is printed to stdout
and can be redirected to a file:
> kh_run_drc > drc_report.txt
> cat drc_report.txt
The following command sets the date in all schematic and board files to today's date:
> kh_set_date
The following command sets the revision in all schematic and board files:
> kh_set_revision v1.0