kicad-developers team mailing list archive
Mailing list archive
Re: Back annotate references from PCB
> On Nov 22, 2019, at 2:17 PM, Brian <lotharyx@xxxxxxxxx> wrote:
> An aside...
> On 11/22/19 3:14 PM, Andy Peters wrote:
>> Now select that sub-sheet symbol by left-clicking/holding and drawing a rectangle around it. Right-click and choose “duplicate block.” Now you have a new instance of that same sub-sheet.
> As a user, I would not expect "Duplicate" to mean "Create a shallow copy." I would expect the duplicated block to be completely independent of the original block. If that is actually the behavior (a shallow copy, i.e. a new reference to the same block), "Duplicate" is a misleading term.
> How, then, would I take a sub-sheet and create a deep copy, in the case that my intent was to modify the copy in some way without affecting the original?
> Thanks for engaging on my rabbit-trail!
“Copy” and “duplicate” are (as both nouns and verbs) mostly synonymous. “Duplicate” means:
1: consisting of or existing in two corresponding or identical parts or examples
2: being the same as another
(One might argue that “duplicate copies” is redundant.)
In the case of the EESchema user interface, the operation makes a new instance of the selected object. That is, it really does make a duplicate. A sheet really is no different from a part symbol. Would you expect that your copy of the part symbol did not include the footprint? So, I think, “duplicate …” is the correct term, and the result is what the user should expect.
Now I just did a test, and realized that when you do the block-select to highlight/select the subsheet symbol, the right-click context menu includes both “Copy” and “Duplicate."
So what is the difference between “copy” and “duplicate” in the context of Kicad? They are not the same!
The former (copy) puts the selected things into the copy/paste buffer. It doesn’t immediately add anything to your schematic. You can then go to anywhere in your schematic project (even to another sheet), do a Paste, and there’s a copy of your objects. But you can only copy blocks, not individual things.
The latter (duplicate) is immediate - the new instance of the selected stuff is now on your cursor and you can move and place it, but only on the current sheet. And, notably, the stuff you selected and duplicated does _NOT_ go into the copy/paste buffer.
Now I’m going down the rabbit-hole, too! Why? Because when you select a single symbol/thing on a sheet, there is no “copy” available. That is, you can’t do Ctrl-C (or Cmd-C) on a resistors symbol and copy it, and in the right-click context menu you do not see Copy as an option. But you do see Duplicate as an option — and its hotkey is C! You have to do a block-select of the resistor to do a proper copy.
So to answer, "How, then, would I take a sub-sheet and create a deep copy, in the case that my intent was to modify the copy in some way without affecting the original?”
Block-select the subsheet symbol and either copy or duplicate it. After you place the new instance of that subsheet symbol, mouse over the new symbol and hit E (for Edit), and a small dialog pops up. Give the copy a new File Name. (And give it a better sheet name, too.) After you click “OK,” you’ll get a message box asking for confirmation: “Create a new file newsubsheet.sch with the contents subsheet.sch? This cannot be undone.” Click YES and it will create a new file for your new subsheet. (Remember each sheet in a Kicad schematic is its own file.) The things in that new file are identical to what is in the source of the copy, but when you edit the new subsheet the older (source) subsheet is not affected.
Hope this helps. I use subsheets, both multiple-instances of the same subsheet as well as separate sheets, all the time.