Am I too stupid or is KiCad mixing up X and Y while sorting for annotation?

Yesterday I was working on a schematic which has a lot of repeating circuitry, so I want the annotation to be correct on the first time and not have to go through and annotate symbols by hand to make it work. I am mentioning this because I never paid much attention to annotation apart from having every part annotated but I didn’t really care in which order or way…

Anyway, so I’ll simplify this. Here is a possible scenario:

When I annotate this with the following settings (sort by X):

This is what I get:

When I sort by Y (otherwise same settings as above), I get this:

Am I stupid or is this the wrong way?

I am using KiCad 5.1 on Ubuntu 18.04.

Thanks for any help!

I don’t know about your IQ, but it does what it promises, although “by X/Y” isn’t very self evident.

Because of your dark theme you don’t probably see this:

image

Would you need something else?

2 Likes

Yeah, I remember these small symbols! You are right, they are there but I can’t see them. This drawing makes it apparent of course what’s happening.

But nevertheless, isn’t it backwards? If you didn’t have this drawing what would you assume would happen when you “sort by X position”?

I agree with you that “by X/Y position” isn’t self evident. One needs this drawing to understand it. I’ll just accept my backwards thinking I guess.

My IQ is super high by the way.

It’s weird but I guess it kind of makes sense. When sorting by X position, you do first all the components with a lower X coordinate.

I think a better approach would be if the dialog said something like:

  • Left to Right then Top to Bottom
  • Top to Bottom then Left to Right
2 Likes

Yeah, when I think about it, it might also be my lack of being a native English speaker. I think I am mixing up “sorting” and “numbering” in this context. And I’d argue that it’s actually these two actions happening consecutively.

Because when you do “sort by X position” KiCad is indeed sorting it them by X position but when it encounters multiple symbols with the same X coordinate, it is then numbering the components by Y position. Makes sense I guess…

Anyway, I think the little drawing is the key to understanding this. Might be cool to have it be a brigther color in the dark theme. I can’t actually remember chosing a dark theme, in my memory “the drawing disappeared”.

It’s not backward but the phrase is a bit unclear. What happens for “sort by X” is this condition is enforced: X(Ra) < X(Rb) ⇒ a < b, and analogously for “sort by Y”. If there is a tie in X, then there is a minor “sort by Y” and analogously for a tie in Y. As you can verify, a sort with X as the major key and Y as the minor key will enforce the condition for “sort by X”.

tiagogala wrote more or less the same in other words.

Thanks for discussing this with me. It’s nice to hear that this isn’t clear to other users as well. I could at least answer my question so far :joy: KiCad is right, I am too stupid.

I have a follow-up question that confuses me too, for anybody who’s still here: Is there a way to keep the existing annotation in a hierarchical sheet but just reverse the X/Y sorting?

Example: You have three schematic sheets where (amonst other circuitry) each contains the same 100 ICs but its respective three units. So

  • sheet 1 has U1A to U100A
  • sheet 2 has U1B to U100B
  • sheet 3 has U1C to U100C

The way the circuitry works makes it so that in sheets 1 and 2 the symbols are arranged vertically but in sheet 3 they are arranged horizontally. What would I do to annotate these in a matching way?

I tried to annotate the whole schematic first and let it number vertically (so that sheets 1 and 2 are correct), then move to sheet 3 and annotate this way:


But this doesn’t actually change anything because everything on sheet 3 is already annotated. Is there a way to “keep” the annotation and just chose the other numbering scheme?

Thank you!

I found that by using “First free after sheet number x 100” in the initial annotation, I can achieve what I want.

Still curious if there is a way to keep the same annotation in a sheet but just apply a different sorting to it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.