How to automatically reposition footprint reference and values?

Hello,

I have imported an Eagle projects with success but some reference and values are messed up a bit on PCB. I want them to stay in order as before. So I have edited a resistor footprint once more and repositioned a reference and value as I want to be. I have updated the PCB layout but no changes - still mess. How would you make it?

If they all have the same offset (not that unlikely, i assume they all have the same position error) and there are a lot, you could create a Python script. But it is likely that it is faster to do it by hand.

To do it by hand, mark every text that is moved in the same direction and same distance (mark them by holding shift), and then move them by clicking M, move the mouse and left click. Repeat that for every direction the texts are moved.

The other solution is to fix the Eagle importer in KiCad. Check if there is a issue on GitLab or if the current master may already has a fix, and if not create issue and if you have the skills and enough time you could try to fix it and create a merge request.

How many reference texts do you have that you have to correct?

You can partially do this using the selection filter. If you uncheck all but ‘texts’ you can move several selected texts at once.

If you hold down Ctrl while selecting things, you can add more groups of texts to your selection. That may be usefull if some texts need to stay put.

AFAIK there is no existing option to automatically allocate texts to default positions. Perhaps that you can do something in the update menu that resets texts.

Regards :coffee:

Bas

1 Like

Thanks you all for valuable tips. This is where Eagle wins - you can always “reposition” attributes as they were designed in a footprint.

What do you mean by that? In KiCad it’s possible to reset the text items by re-loading the footprint from the library. If that’s what you mean by “as they were designed in a footprint”. This of course requires a library to start with, and it wouldn’t help you in this case because you probably don’t have corresponding libraries for the footprints in an imported layout.

Blockquote What do you mean by that? In KiCad it’s possible to reset the text items by re-loading the footprint from the library. If that’s what you mean by “as they were designed in a footprint”. This of course requires a library to start with, and it wouldn’t help you in this case because you probably don’t have corresponding libraries for the footprints in an imported layout

I mean Eagle command “Restore position” which actually restore positions of the NAME and VALUE.
So in my case it would solve the problem when some attributes (VALUES, NAMES) were moved or dragged somewhere accidentally.

Blockquote To do it by hand, mark every text that is moved in the same direction and same distance (mark them by holding shift), and then move them by clicking M, move the mouse and left click. Repeat that for every direction the texts are moved.

Yes, I will correct them by hand. Not to much to work, just learning the KiCad with your help :wink:

So in my case it would solve the problem when some attributes (VALUES, NAMES) were moved or dragged somewhere accidentally.

Why are the positions wrong? In the original question, it seemed like there where wrong after the import from Eagle, i.e. the KiCad Eagle importer has a bug where the textposition isn’t correct.
But here, you say the position is wrong because someone accidentally moved it.
Since when is the position wrong?

In case of the former one: Correct it manually, write a script to fix it or fix the importer. In case of the later one, you may can reimport the file (depends on how much work you already invested in the imported board).

Ok, I see your point. I mixed my answer with a different scenario - sorry.
Yes, we still talk the Eagle import.

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