.. Automatically generated by KiBot, please don't edit this file Supported preflights ^^^^^^^^^^^^^^^^^^^^ - **annotate_pcb**: :index:`: ` [dict] Annotates the PCB according to physical coordinates. This preflight modifies the PCB and schematic, use it only in revision control environments. |br| Used to assign references according to footprint coordinates. |br| The project must be fully annotated first. - Valid keys: - ``bottom_main_ascending`` :index:`: ` [boolean=true] Sort the main axis in ascending order for the bottom layer. For X this is left to right and for Y top to bottom. - ``bottom_main_axis`` :index:`: ` [string='y'] [x,y] Use this axis as main sorting criteria for the bottom layer. - ``bottom_secondary_ascending`` :index:`: ` [boolean=true] Sort the secondary axis in ascending order for the bottom layer. For X this is left to right and for Y top to bottom. - ``bottom_start`` :index:`: ` [number=101] First number for references at the bottom layer. Use -1 to continue from the last top reference. - ``grid`` :index:`: ` [number=1.0] Grid size in millimeters. - ``top_main_ascending`` :index:`: ` [boolean=true] Sort the main axis in ascending order for the top layer. For X this is left to right and for Y top to bottom. - ``top_main_axis`` :index:`: ` [string='y'] [x,y] Use this axis as main sorting criteria for the top layer. - ``top_secondary_ascending`` :index:`: ` [boolean=true] Sort the secondary axis in ascending order for the top layer. For X this is left to right and for Y top to bottom. - ``top_start`` :index:`: ` [number=1] First number for references at the top layer. - ``use_position_of`` :index:`: ` [string='footprint'] [footprint,reference] Which coordinate is used. - **annotate_power**: :index:`: ` [boolean=false] Annotates all power components. This preflight modifies the schematic, use it only in revision control environments. |br| Used to solve ERC problems when using filters that remove power reference numbers. - **check_zone_fills**: :index:`: ` [boolean=false] Zones are filled before doing any operation involving PCB layers. The original PCB remains unchanged. If you need to abort when the zone fill creates significant changes to a layer use the CheckZoneFill internal template. - **erc_warnings**: :index:`: ` [boolean=false] **Deprecated**, use the `warnings_as_errors` option from `run_erc`. Option for `run_erc`. ERC warnings are considered errors. - **fill_zones**: :index:`: ` [boolean=false] Fill all zones again and save the PCB. - **filters**: :index:`: ` [list(dict)] A list of entries to filter out ERC/DRC messages. Note that ignored errors will become KiBot warnings (i.e. `(W058) ...`). |br| To farther ignore these warnings use the `filters` option in the `global` section. - Valid keys: - ``error`` :index:`: ` [string=''] Error id we want to exclude. A name for KiCad 6 or a number for KiCad 5, but always a string. - *error_number* :index:`: ` Alias for number. - ``filter`` :index:`: ` [string=''] Name for the filter, for documentation purposes. - *filter_msg* :index:`: ` Alias for filter. - ``number`` :index:`: ` [number=0] Error number we want to exclude. KiCad 5 only. - ``regex`` :index:`: ` [string=''] Regular expression to match the text for the error we want to exclude. - *regexp* :index:`: ` Alias for regex. - **ignore_unconnected**: :index:`: ` [boolean=false] **Deprecated**, use the `ignore_unconnected` option from `run_drc`. Option for `run_drc`. Ignores the unconnected nets. Useful if you didn't finish the routing. |br| It will also ignore KiCad 6 warnings. - **pcb_replace**: :index:`: ` [dict] Replaces tags in the PCB. I.e. to insert the git hash or last revision date. This is useful for KiCad 5, use `set_text_variables` when using KiCad 6. |br| This preflight modifies the PCB. Even when a back-up is done use it carefully. - Valid keys: - ``date_command`` :index:`: ` [string=''] Command to get the date to use in the PCB.\\ ```git log -1 --format='%as' -- "$KIBOT_PCB_NAME"```\\ Will return the date in YYYY-MM-DD format.\\ ```date -d @`git log -1 --format='%at' -- "$KIBOT_PCB_NAME"` +%Y-%m-%d_%H-%M-%S```\\ Will return the date in YYYY-MM-DD_HH-MM-SS format.\\ Important: on KiCad 6 the title block data is optional. This command will work only if you have a date in the PCB/Schematic. - ``replace_tags`` :index:`: ` [dict|list(dict)] Tag or tags to replace. - Valid keys: - ``after`` :index:`: ` [string=''] Text to add after the output of `command`. - ``before`` :index:`: ` [string=''] Text to add before the output of `command`. - ``command`` :index:`: ` [string=''] Command to execute to get the text, will be used only if `text` is empty. KIBOT_PCB_NAME variable is the name of the current PCB. - ``tag`` :index:`: ` [string=''] Name of the tag to replace. Use `version` for a tag named `@version@`. - ``tag_delimiter`` :index:`: ` [string='@'] Character used to indicate the beginning and the end of a tag. Don't change it unless you really know about KiCad's file formats. - ``text`` :index:`: ` [string=''] Text to insert instead of the tag. - **run_drc**: :index:`: ` [boolean=false|dict] Runs the DRC (Distance Rules Check). To ensure we have a valid PCB. The report file name is controlled by the global output pattern (%i=drc %x=txt). |br| Note that the KiCad 6+ *Test for parity between PCB and schematic* option is not supported. |br| If you need to check the parity use the `update_xml` preflight. |br| KiCad 6 introduced `warnings` they are currently counted be the `unconnected` counter of KiBot. |br| This will change in the future. |br| If you use DRC exclusions please consult the `drc_exclusions_workaround` global option. - Valid keys: - ``dir`` :index:`: ` [string=''] Sub-directory for the report. - ``enabled`` :index:`: ` [boolean=true] Enable the DRC. This is the replacement for the boolean value. - ``ignore_unconnected`` :index:`: ` [boolean=false] Ignores the unconnected nets. Useful if you didn't finish the routing. It will also ignore KiCad 6 warnings. - **run_erc**: :index:`: ` [boolean=false|dict] Runs the ERC (Electrical Rules Check). To ensure the schematic is electrically correct. The report file name is controlled by the global output pattern (%i=erc %x=txt). - Valid keys: - ``dir`` :index:`: ` [string=''] Sub-directory for the report. - ``enabled`` :index:`: ` [boolean=true] Enable the ERC. This is the replacement for the boolean value. - ``warnings_as_errors`` :index:`: ` [boolean=false] ERC warnings are considered errors. - **sch_replace**: :index:`: ` [dict] Replaces tags in the schematic. I.e. to insert the git hash or last revision date. This is useful for KiCad 5, use `set_text_variables` when using KiCad 6. |br| This preflight modifies the schematics. Even when a back-up is done use it carefully. - Valid keys: - ``date_command`` :index:`: ` [string=''] Command to get the date to use in the SCH.\\ ```git log -1 --format='%as' -- "$KIBOT_SCH_NAME"```\\ Will return the date in YYYY-MM-DD format.\\ ```date -d @`git log -1 --format='%at' -- "$KIBOT_SCH_NAME"` +%Y-%m-%d_%H-%M-%S```\\ Will return the date in YYYY-MM-DD_HH-MM-SS format.\\ Important: on KiCad 6 the title block data is optional. This command will work only if you have a date in the SCH/Schematic. - ``replace_tags`` :index:`: ` [dict|list(dict)] Tag or tags to replace. - Valid keys: - ``after`` :index:`: ` [string=''] Text to add after the output of `command`. - ``before`` :index:`: ` [string=''] Text to add before the output of `command`. - ``command`` :index:`: ` [string=''] Command to execute to get the text, will be used only if `text` is empty. KIBOT_SCH_NAME variable is the name of the current sheet. KIBOT_TOP_SCH_NAME variable is the name of the top sheet. - ``tag`` :index:`: ` [string=''] Name of the tag to replace. Use `version` for a tag named `@version@`. - ``tag_delimiter`` :index:`: ` [string='@'] Character used to indicate the beginning and the end of a tag. Don't change it unless you really know about KiCad's file formats. - ``text`` :index:`: ` [string=''] Text to insert instead of the tag. - **set_text_variables**: :index:`: ` [dict|list(dict)] Defines KiCad 6+ variables. They are expanded using `${VARIABLE}`, and stored in the project file. |br| This preflight replaces `pcb_replace` and `sch_replace` when using KiCad 6. |br| The KiCad project file is modified. |br| .. warning:: don't use `-s all` or this preflight will be skipped .. . - Valid keys: - ``after`` :index:`: ` [string=''] Text to add after the output of `command`. - ``before`` :index:`: ` [string=''] Text to add before the output of `command`. - ``command`` :index:`: ` [string=''] Command to execute to get the text, will be used only if `text` is empty. This command will be executed using the Bash shell. Be careful about spaces in file names (i.e. use "$KIBOT_PCB_NAME"). The `KIBOT_PCB_NAME` environment variable is the PCB file and the `KIBOT_SCH_NAME` environment variable is the schematic file. - ``expand_kibot_patterns`` :index:`: ` [boolean=true] Expand %X patterns. The context is `schematic`. - ``name`` :index:`: ` [string=''] Name of the variable. The `version` variable will be expanded using `${version}`. - ``text`` :index:`: ` [string=''] Text to insert instead of the variable. - *variable* :index:`: ` Alias for name. - **update_qr**: :index:`: ` [boolean=false] Update the QR codes. Complements the `qr_lib` output. |br| The KiCad 6 files and the KiCad 5 PCB needs manual update, generating a new library isn't enough. - **update_xml**: :index:`: ` [boolean=false|dict] Update the XML version of the BoM (Bill of Materials). To ensure our generated BoM is up to date. |br| Note that this isn't needed when using the internal BoM generator (`bom`). |br| You can compare the PCB and schematic netlists using it. - Valid keys: - **check_pcb_parity** :index:`: ` [boolean=false] Check if the PCB and Schematic are synchronized. This is equivalent to the *Test for parity between PCB and schematic* of the DRC dialog. Not available for KiCad 5. **Important**: when using KiCad 6 and the *Exclude from BoM* attribute these components won't be included in the generated XML, so we can't check its parity. - ``as_warnings`` :index:`: ` [boolean=false] Inform the problems as warnings and don't stop. - ``enabled`` :index:`: ` [boolean=true] Enable the update. This is the replacement for the boolean value.