element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Support (English) Using leading zero's in part numbering
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 7 replies
  • Subscribers 172 subscribers
  • Views 699 views
  • Users 0 members are here
  • part
  • numbering
  • part_number_configuration
  • zero
  • leading
Related

Using leading zero's in part numbering

pvsed
pvsed over 12 years ago

I appologize if this item would already exist on this forum, but I didn't find a search function here in the Eagle support subforum.

 

So, I'm able to change the name of the components. Using ULP's I can renumber all components, even choose the starting number etc...

 

Is is possible to get leading zero's in components names?

An example: in the situation at this moment, components are numered like this: R1, R2,.... R10, R11,  R101, R01, etc.

I would like to have them numered like this: R001, R002,... R010, R011,... R101,...

 

Why? Because when exporting the component lists to spreadsheats, it's far more easy to sort them when they are numbered with leading zero's. Otherwise you have them sorted in the strange way like this: R1, R10, R101, R11, R2,...

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 12 years ago

    Paul Vandenbulcke wrote:

     

    I appologize if this item would already exist on this forum, but I didn't

    find a search function here in the Eagle support subforum.

     

    So, I'm able to change the name of the components. Using ULP's I can

    renumber all components, even choose the starting number etc...

     

    Is is possible to get leading zero's in components names?

    An example: in the situation at this moment, components are numered like

    this: R1, R2,.... R10, R11,  R101, R01, etc. I would like to have them

    numered like this: R001, R002,... R010, R011,... R101,...

     

    Why? Because when exporting the component lists to spreadsheats, it's far

    more easy to sort them when they are numbered with leading zero's.

    Otherwise you have them sorted in the strange way like this: R1, R10,

    R101, R11, R2,...

     

    The NAME command/icon works just fine for this. It will happily rename R1 to

    R001 and so on.

     

    That said, I prefer to renumber components by page number (R100 is on page

    1, C530 on page 5, etc) Still sorts fine. Or for the freeware editions,

    number components so related components in circuit function blocks have

    related numbers. Nobody says the numbers have to be contiguous.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • pvsed
    0 pvsed over 12 years ago in reply to Former Member

    Thanks for your reply.

    I didn't know that this would work, but it implies manual naming of the components. I had hoped to get this automatically.

    When drawing my circuit: first I place all components, nets, without paying attention to the component names. Then, when the circuit is finished, I use one of the few renumbering-components routines in the (downloadable) "user language programs", but all these don't us leading zero's.

     

    Now, It's nice to know I can get my leading zero's by manually changing the names (twice). Yes, twice, because you cannot change a name from C1 to C01: then you get the message that this name already exists, so you first have to rename to another non-existing name and then to the leading-zero-name. Automatically renaming to intermediate names before manually renaming to the right names could be an alternative, but then you have to manually rename all components, not only the ones you want to give leading zero's.

     

    Until now I always used automatic numbering, starting from 10 (if there are less than 90 components of the same type on a page) or 100, but this is not my 'preferred' way: I't s bit silly to have you IC's numbered U10, U11, U12, U13 when there are only four of them on a one-page-circuit. I know, this is only a minor detail and the names are there for reference only, but I would be nice to have the option in the ULP's dialog window to enter the minimum number of digits when automatically (re-)numbering components.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dukepro
    0 dukepro over 12 years ago

    On 07/20/2012 04:04 AM, Paul Vandenbulcke wrote:

    I appologize if this item would already exist on this forum, but I

    didn't find a search function here in the Eagle support subforum.

     

    So, I'm able to change the name of the components. Using ULP's I can

    renumber all components, even choose the starting number etc...

     

    Is is possible to get leading zero's in components names? An example:

    in the situation at this moment, components are numered like this:

    R1, R2,.... R10, R11,  R101, R01, etc. I would like to have them

    numered like this: R001, R002,... R010, R011,... R101,...

     

    Why? Because when exporting the component lists to spreadsheats, it's

    far more easy to sort them when they are numbered with leading

    zero's. Otherwise you have them sorted in the strange way like this:

    R1, R10, R101, R11, R2,...

     

     

    Paul,

     

    Look at renumber_sheet.sch.  It's included with 6.2.  It will do exactly

    what you're requesting.

     

    Read the usage comments at the top of the file.

     

    Enjoy,

        - Chuck

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • pvsed
    0 pvsed over 12 years ago in reply to dukepro

    Thank you for replying, Chuck.

     

    I have tested this ULP: renumber_sheet.ulp (ulp-version 4.4.0).  But I don't succeed in renumbering automatically with component names looking as follows: R01, R02,... C01, C02,...

    I do succeed in renaming them in R1, R2, R3,...

    Or also in R101, R102, R103,... also works.

     

    How are you doing this?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dukepro
    0 dukepro over 12 years ago in reply to pvsed

    On 07/24/2012 04:31 AM, Paul Vandenbulcke wrote:

    Thank you for replying, Chuck.

     

    I have tested this ULP: renumber_sheet.ulp (ulp-version 4.4.0).  But I don't succeed in renumbering automatically with component names looking as follows: R01, R02,... C01, C02,...

    I do succeed in renaming them in R1, R2, R3,...

    Or also in R101, R102, R103,... also works.

     

    How are you doing this?

     

    Well... I'm not.  I just ran across this while researching an answer to

    your problem.

     

    However, using a plain text editor, look at line 179.  It contains:

     

          sprintf(NewNames[i[n]], "%s%d", NewNames[i[n]], ++k);

     

    Change the "%s%d" to "%s%02d" to get 2-digit numbering, or to "%s%03d"

    to get 3-digit numbering.

     

    With a little creative programming, you could add a parameter or two to

    a dialog box and generate this format string on the fly.

     

    Hope this helps

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago in reply to dukepro

    You're the man, Chuck.

     

    Thanks for what you do here on the forums.

     

    Best Regards,

    Jorge Garcia

    Cadsoft Support

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • pvsed
    0 pvsed over 12 years ago in reply to dukepro

    Thank you very much, Chuck.

     

    By adapting this line in the ULP, I get what I want.

    In the first run I got some upcoming dialogs (almost for every component): R01 already exixts, R02, already exists,... but I used another ULP (renumber-sch-group_v2) to first rename them to another number-region (f.e. starting at R501) and after that it ran flawless.

     

    By the way, I always use the ULP: "renumber-sch-group_v2.ulp" because it has some more options. Your tip is also working for this ULP (line 167).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube