Skip to content

Commit 71699fd

Browse files
committed
[EEschema][Export][Added] Workaround for KiCad bugs #20448 + #20453
- #20448 KiCad 9 created sch without pages for new projects - #20453 kicad-cli doesn't report a fail when selecting a bogus page to print See INTI-CMNB/KiDiff#16
1 parent e8c1088 commit 71699fd

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77

8+
## [2.3.5] - UNRELEASED
9+
### Added
10+
- Workaround for KiCad bugs #20448 + #20453
11+
- #20448 KiCad 9 created sch without pages for new projects
12+
- #20453 kicad-cli doesn't report a fail when selecting a bogus page to print
13+
14+
815
## [2.3.4] - 2025-02-24
916
### Added
1017
- KiCad 9 support and optimizations

src/eeschema_do

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,12 @@ def eeschema_plot_schematic_cli(cfg):
248248
if cfg.ki9 and cfg.default_font:
249249
cmd.extend(['--default-font', cfg.default_font])
250250
cmd.append(cfg.input_file)
251-
run_command(cmd)
251+
res = run_command(cmd)
252+
# KiCad bug: #20448 empty schematic without pages + #20453 that returns 0 on fail
253+
if 'No sheets to plot' in res and not cfg.all_pages and cfg.ki8:
254+
logger.warning('No pages printed, trying to print all')
255+
index = cmd.index('--pages')
256+
run_command(cmd[:index]+cmd[index+2:])
252257

253258

254259
def eeschema_plot_schematic(cfg):

0 commit comments

Comments
 (0)