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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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 180 subscribers
  • Views 1000 views
  • Users 0 members are here
  • part
  • numbering
  • part_number_configuration
  • zero
  • leading
Related

Using leading zero's in part numbering

pvsed
pvsed over 13 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
Parents
  • dukepro
    0 dukepro over 13 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 13 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 13 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
Reply
  • dukepro
    0 dukepro over 13 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
Children
  • Former Member
    0 Former Member over 13 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 13 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