How to make Silkscreen Number Match Reference Number

I am trying to make a footprint. The goal is to have a silkscreen marking for each identical footprint on the board, that goes up in number. I have figured out how to make a silkscreen text field match a reference designator, by using ${REFERENCE} in the text field. If anyone can point me to more of these types of operations that would be very useful. Basically I want to pull the reference designator, but just the number, and disregard the letter prefix. Any ideas?

Do you mean (for example) that 20 resistors would be labeled 1 through 20 without the “R”? If that is not what you mean, please give an example.

That is exactly what I mean.

OK thanks. I do not have the answer but I wanted to make sure the question was clear, in case someone else does have the answer…

So the functionality of using ${Reference} in a text field to automatically pull a reference designator seems key. Can anyone tell me how that system works or point me at more information about how to use those kind of automatic formatting things? It reminds me a bit of excel formulas, but I don’t know what to search for to learn more about that system in kicad.

KiCad text handling is simple, you can’t do tricks with it. This would require python scripting, and even then you would need to run the script every time the references are changed.

1 Like

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