10

I have a circuit in Eagle, and say that counting from left, I have R1, R2, R3, then between R1 and R2 I'm adding a new resistor, it will be named R4. I will end with (looking on the circuit) R1, R4, R2, R3.

It's not ordered.

I would like to keep elements ids (separately for each element type, e.g resistors, capacitors) in order from lowest to highest (counting from left). Is there a script or settings in eagle that will do it automatically for me?

Robert
  • 103
  • 1
  • 1
  • 6

3 Answers3

12

Although Tom Carpenters anwser is right, I am adding this as an alternative.

Eagle already has an inbuilt tool that will allow you to renumber parts without the need for external ULP scripts.

In your schematic editor in your menu, open "Tools" and click "Renumber parts". This will automatically renumber all your parts in the schematic as you wish.

Golaž
  • 1,997
  • 3
  • 34
  • 51
  • +1 for learning new things every day - didn't know that was in the menu. But as is the way with Eagle, this is actually just a shortcut which calls the renumber-sheet ULP. – Tom Carpenter Jun 23 '15 at 19:48
6

There is a ULP included with Eagle to do this. It is called 'renumber-sheet.ulp'.

What this does is count in the direction you specify (up/down, left/right) in the schematic and renumber all parts with the same letter (e.g. all "R###", all "C###") to be in sequential order.

I believe that is exactly what you want, but if you are talking about in the layout, I don't think this will do that, though it could probably be modified to do so.

Tom Carpenter
  • 65,995
  • 3
  • 145
  • 204
  • 1
    I'm not an Eagle user and I'm not disputing your answer, but if they provide positional reference renumbering on the schematic and not on the PCB, they sure got it backwards. IME, it is far more important to have it on the PCB, especially for troubleshooting (with a scope or meter) or hand-assembly from a BOM. I can't imagine why you would want it on the schematic instead, unless you are not planning on making a PCB. – Tut Jun 23 '15 at 11:04
  • FYI ... I just found an interesting discussion on this: http://www.eaglecentral.ca/forums/index.php/mv/msg/36342/123835/ – Tut Jun 23 '15 at 11:17
  • @Tut the ULP renumbers both the components in the layout and in the schematic together (to retain consistency). However you have to run the ULP from the schematic - in otherwords you can't say number each component left to right as they appear in the board without modifying the ULP (which should actually be quite trivial to do). – Tom Carpenter Jun 23 '15 at 19:47
  • From the discussion I linked to: "The ULP cmd-renumber.ulp renumbers components on the PCB in a logical order, and if the schematic is open, back annotation happens automatically." ... This would seem to indicate that it is possible to do a positional renumber for the PCB, but as I said, I'm not an Eagle user. I use Cadstar. With Cadstar you do a "positional rename" from the PCB editor (with adjustable automatic features or you can do it manually), and then when all finished you perform a "back annotation" from the schematic editor. – Tut Jun 23 '15 at 20:09
1

There is a great ULP named 'cmd-renumber'. This ULP will effortlessly renumber your components as they appear on your board layout. This is contrary to the ULP 'renumber-sheet' which will renumber your components as they appear in the schematic. The built in tool in Eagle appears to simply run the 'renumber-sheet' ULP. The 'renumber-sheet' ULP may also require some extra work around or understanding, you can read more about this here: https://forums.autodesk.com/t5/eagle-forum/bug-report-renumber-ulp-broken-in-9-5-2/td-p/9155600