Appending components in Eeschema resets all annotations

Hi all,

I have had a lot of trouble keeping the annotations when appending any parts to an Eeschema schematic.
I’ve simplified the issue down to the following steps:
-Have a schematic and associated cvPCB file with completed PCB
-Append small schematic
-Annotate with “Keep existing annotations”

Then the “Annotate schematic” window dialog box shows that the entire schematic has been re-annotated. I can’t get around this.

Updated kicad this morning from 5.0.0 to 5.0.2 on ubuntu.
Updating the PCB from schematic by timestamp still results in hundreds of errors in the DRC.
Is this a bug I’m dealing with or am I going about this the wrong way?

I will also note that running “Annotate schematic” with “keep existing annotations” before appending the new components runs just fine, e.g. keeps all existing annotations and runs without any effect.

I can not really see anything on the screenshot you added. (Not enough resolution)

Do the references for your appended stuff end in “?” or in a number?
If they end in a number then you might need to manually remove the annotation from that part. (Maybe the annotation breaks down because you have a reference duplicated.)

yes - the appended components all end in “?” before being annotated.

wow, actually all of the annotations are cleared as soon as the new component is appended.
before appending:

after appending a schematic with one resistor:

What tool are you using to append stuff?

“Append schematic sheet…” in the File menu.

Does the same happen if you add a new symbol using the “add symbol” tool?

Adding symbols works fine without changing annotations.

I just tested it in current nightly and i get the same result. Seems like there is a bug in the append schematic stuff

See above :slight_smile: -------------------

I have already clicked on your link. you have just been a few seconds faster than i have been. (just trying to figure out why that bug is marked incomplete.)

Thanks. Glad it’s been called to attention and is being looked at. I’ll see if I can follow those steps for a temporary fix.

I’d like to have an option that KEEPs all annotations for those components from the appended sheet after the appending operation, this is extremely useful when I like to append the schematic and the layout together, and then use the Update PCB from Schematic fuction in the pcbnew to sync the two (sure I need fine tune beforehand to avoid confliction).


That has a workaround, too. You can copy a hierarchical sheet file from one project to another, create a hierarchical sheet and point it to that file. I don’t remember all the details, it may need some manual tweaking, but it’s possible. It of course requires that the new schematic doesn’t have the same reference numbers already.

Update PCB from Schematic can be by Reference, or timestamp. Reset reference of appended symbol still be fine for update PCB (If timestamp are keep).

Thanks for your workaround. actually I tried the similar way but couldn’t get the desired outcome, maybe as you mentioned it need some tweaking.
It would be nice if the application can add a popup dialog asking if the operator like to keep the annotation while trying appending another sheet. I am not familiar to the code base, maybe it’s not the difficult to add the feature when fixing the OP’s problem.

Probably the symbol libraries are the problem. A sheet file may have these kind of lines:


Of course if you copy the file to another project it points to wrong symbol cache file(s). You can try to delete the lines or change them according to the new project.

1 Like

yeah, the libs were the problem. I just tried the procedure again, and it worked. simpified procedure is

  1. create hierarchical sheet, and append the intended sheet.
  2. copy and paste the original sheet to the newly created hierachical sheet using a text edit tool, except the LIBS: … line
  3. reopen the root sheet, confirm the update dialog
    now the hierachical sheet shows the numbers

One workaround to keep the annotations when appending an exsisting sheet can be done by:

1: Move all the components that you need to keep annotated an inch to the side
2: Append a sheet as normal
3: Focus the window on the components that you moved in step 1.
4: Press ctrl+z to undo the move in step 1. Which will also bring back the annotations.

I think this procedure is a bug, but it solves the problem. :slight_smile: