Closed gonzalop closed 3 months ago
@gonzalop the plugin already supports generating design packages for hierarchical sheets. Is this adding support to another feature area of the plugin? If so, can the commit subject be clarified?
Updated. the subject The code makes it rewrite schematics files when exporting changes made by the plugin. Before this change, only the main schematics file was updated.
@gonzalop ahh gotcha, can you update the commit message itself? The subject of the PR might default to the subject of the first commit or something but editing the PR subject doesn't directly edit the commit log message. Should be possible to edit it via 'git commit --amend' or with a git rebase.
Done.
Thanks.
@chmorgan Did you already test this PR? I have never before used hierarchical sheets in KiCAD, so I canno really test this ...
I haven’t. I haven’t used that export feature before, not sure what it’s used for actually….
On Tue, Jul 30, 2024 at 6:40 AM bouni @.***> wrote:
@chmorgan https://github.com/chmorgan Did you already test this PR? I have never before used hierarchical sheets in KiCAD, so I canno really test this ...
— Reply to this email directly, view it on GitHub https://github.com/Bouni/kicad-jlcpcb-tools/pull/506#issuecomment-2258038701, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJH4ACTCMPR5AHD6BTARKTZO5UQTAVCNFSM6AAAAABLSOUQKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJYGAZTQNZQGE . You are receiving this because you were mentioned.Message ID: @.***>
The export function writes LCSC data that was set via the Plugin back to the schematic.
@gonzalop Can you provide an example project so that I can test this PR?
Here's an example project: 6-example.prj.zip
And here's a screenshot of the output when exporting to schematic:
(the screenshot shows 'LCSC Part' which I added in another pull request)
For whatever reason this does not work for me ...
I run KiCAD 8.0.4
If I extract your zip and open the project, the export to schematic function does not find the correct kicad_sch file because of the .prj
in the filename. If I then select the right file 6-example.prj.kicad_sch
in this case, the only ozutput I see is
2024.07.31 16:03:12 - INFO - load_schematic - Kicad 8+...
2024.07.31 16:03:12 - INFO - _update_schematic8 - Reading C:\Projekte\KiCad\6-example.prj\6-example.prj.kicad_sch...
Nothing happens to the another-sheet.kicad_sch
file.
Furthermore, none of the two resistors in the schematic files gets the LCSC property set ...
That's odd. It might be some windows oddity. I'll find a windows machine to test on later today and report back.
It worked for me just now!?
Very strange. Let me look into it on Friday again, tomorrow is a public holiday 😁
Enjoy the holiday!
FWIW, this was a fresh install of KiCAD 8.0.4 on a Windows 10 machine, and I cloned the branch with this pull request into the scripting/ folder, then cloned the example project and loaded it up in KiCAD.
Ok, I think I figured it out!
This returns a dict after #487 was merged: https://github.com/Bouni/kicad-jlcpcb-tools/blob/ec4aee04b18e1cbaec767e507dc7d9b3028427c8/schematicexport.py#L47
so this no longer works:
replaceing
for part in store_parts:
if value == part[0]:
newLcsc = part[3]
with this
for part in store_parts:
if value == part["reference"]:
newLcsc = part["lcsc"]
solves the issue.
Can you please update and rebase your PR
Done.
Recursively proceses hierarchical sheets when rewriting schematics files.