Skip to content

Commit

Permalink
[KiCanvas] Multiple sheets fix
Browse files Browse the repository at this point in the history
Sort of ... looks like you must explicitly list the sub-sheets, but it has
various drawbacks, look here: theacodes/kicanvas#77

Should fix the issue mentioned by @bluespider42 in #572
  • Loading branch information
set-soft committed Jan 30, 2024
1 parent 144a83d commit 6315728
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions kibot/out_kicanvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,13 @@ def run(self, out_dir):
f.write(f' <kicanvas-embed controls="{self.controls}"{controlslist}>\n')
for s in self.source:
if s == 'pcb':
source = GS.pcb_fname
f.write(f' <kicanvas-source src="{GS.pcb_fname}"></kicanvas-source>\n')
elif s == 'schematic':
source = GS.sch_fname
GS.sch_dir
for s in sorted(GS.sch.all_sheets, key=lambda x: x.sheet_path_h):
f.write(f' <kicanvas-source src="{os.path.relpath(s.fname, GS.sch_dir)}"></kicanvas-source>\n')
else:
source = GS.pro_fname
f.write(f' <kicanvas-source src="{source}"></kicanvas-source>\n')
f.write(f' <kicanvas-source src="{GS.pro_fname}"></kicanvas-source>\n')
f.write(' </kicanvas-embed>\n')
f.write(' </body>\n')
f.write('</html>\n')
Expand Down

0 comments on commit 6315728

Please sign in to comment.