Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Save/Restore layout conflicting with multiple modules derived from same schematic #113

@NickKnatterton

Description

@NickKnatterton

Hey,

first things first: thanks for this great project enhancing the capabilities of KiCAD!
Recently I´ve been using the save/restore function a lot to build projects from "tested" building blocks. (and building a small library of these blocks..)
But on restoring a layout in one specific project (integrity of the .pckl + .sch data was tested in a dummy project before) an
"max() arg is an empty sequence" error occured. With some added debugging info (see attached log).
save_restore_layout.log
I tracked this down to inconsistent module identifiers (do You still call them tstamp? Not sure what else..) in the schematic.
Now the fun part is: The identifiers are correct in my original schematic, but KiCAD changes them when updating the annotation because these specific identifiers already exist. Now why would it do that? Because this new module is an adapted version of an older module which I partly reused but also use in that project in its original state. So both of them have a few parts with the same id, which KiCAD realizes and then changes; corrupting the identifiers for the .pckl .
This probably is a very specific problem to my way of working and excessively using this plugin. But maybe writing it down saves someone the effort to find this out the hard way ;-)
As far as I understand there is no easy way to fix this (aside from not re-reusing your circuits) but for this specific case I just diffed both .sch files and copied the new identifiers into the .pckl.
Any info is this will still be a problem with KiCAD 6 or was the identifier changed anyway? If not I would start writing a script to automate the identifier update from the new .sch file which could be incorporated into the plugin.

Cheers,
Nik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions