I want to create an almost copy of a complex layout block but with minor differences.
I’m almost there using the “replicate layout” plugin, but not quite. Here is what I did:
Copied the hierachical sheet that I wanted to duplicate and done annotation.
=> At this point both sheets share the same schematic file and are thus identical.
Run the “replicate layout” plugin.
=> Now, I have an exact copy of my first layout block, so far so good.
Rename the file of the copied hierarchical sheet, thus a copy of the first is created and now I have two files which in principle could be different.
Update PCB from schematic.
=> No change as expected since the schematic hasn’t really changed.
I add a component to the copied hierachical sheet in the schematic, so now the two blocks are different.
=> The component is not annotated yet.
If I manually annotate the component by just typing the component number into its properties and then update the PCB, all is fine, I just get the extra footprint in the layout.
Now the trouble starts:
If I annotate automatically even with setting “keep existing annotation”, I get the following warning:
“Annotated Conn_01x01_Pin as J19.
Warning: 12 duplicate time stamps were found and replaced.
Annotation complete.”
When I now update the PCB from the schematic, the layout of one of the two blocks is destroyed as the corresponding components are no longer placed.
What can I do to fix this such that I can add components without resorting to manual annotation and without destroying the layout blocks?
I don’t think there is a solution for this. As far as I know, the Replicate Layout plugin relies on hierarchical sheets to link to the same file. As soon as they link to different files, they are no longer identical instances, and the plugin does not work anymore.
It would be nice if KiCad had some way of specifying variants depending on the instance of a sheet. (Edit: Apparently KiCad does have this, see Eelik’s comment below). For example for a graphical (audio) equalizer, where each channel has the same layout, but different part values for the filters. But again, it’s not (yet?) implemented as far as I know.
Replication basically works as intended. And I can also copy to a separate schematic and modify that block, no problem.
The trouble is this timestamping business.
What is this about?
Why does auto-annotate kill the component placement?
P.S.
I should mention that I am using KiCAD7.
In former KiCAD versions it was possible to update a PCB either by timestamp or by reference. Now, I no longer see this choice and it appears that the PCB is always updateb by timestamp. Is there a means to update by reference?
The “Timestamp” has been replaced by UUID’s several KiCad versions ago, and the KiCad developers want to hide the internal implementation from the GUI. In some situations the “Timestamp” text is maintained to keep compatibility with old KiCad versions, but I forgot further details.
These “Timestamps” (UUID’s) is the normal method by which KiCad matches schematic symbols to PCB footprints. If you make a copy of a file KiCad changes the UUID’s (they must be unique for each symbol instance.)
Yes, this functionality still exists and is in the same location, but it’s renamed to: Schematic Editor / Tools / Update PCB from Schematic [F8] / Options / Re-link footprints to schematic symbols based on their reference designators
Differences between KiCad Versions V7 and V8 are not as big as in previous versions, but V8 does have some nice extra features. But it’s a tradeoff between stability and functionality. If you want to stay with V7 for a while (many people do) then at least update to the latest bug release (highest third number in the version number.) which is V7.0.11
It has been implemented for a long time. Sheet instances can have fields in their Properties. Those fields can be used as variables inside the linked sheet file and the field value is replaced for each instance.
But I don’t know if it helps the OP because he doesn’t tell for what purpose he needs to add content to sheets after replicating.
Many thanks folks, for the clarification!
The “Re-link… by reference designators” option completely solves my problem.
That was the one step that I previously missed.
Now, I can modify one of the duplicated schematic blocks without messing up previous component placement.