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
    About the element14 Community
  • 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) Part number formatting
  • 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 4 replies
  • Subscribers 182 subscribers
  • Views 750 views
  • Users 0 members are here
Related

Part number formatting

jsantosrico
jsantosrico over 9 years ago

I would like to know if it's possible to change the part number formatting. In particular, I would like to know if it's possible to pad the numbers so instead of getting R1, R2,... I can get R01, R02,....

 

I ask this because it's a bit annoying to short my BOMs and get R1, R11, R12, ..., R19 and then R2, R20, R21, ..., R3 and so on.

 

Thanks!

  • Sign in to reply
  • Cancel
  • rachaelp
    0 rachaelp over 9 years ago

    Hi Joel,

     

    You could use the renumber function found in Tools->Renumber parts....

     

    Set the numerical order at say 100 and then everything on sheet 1 will start from 100, on sheet 2 from 200 and so on. It's not quite what you asked for but it will satisfy your need for correct numerical ordering.

     

    Best Regards,


    Rachael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 9 years ago

    Hi

     

    Where are you getting this sorted order from? A ulp perhaps? Please

    explain.

    There are ways in Excel to get it ordered that way if that is where you are

    doing it, according to Google.

     

    Warren

    --

    http://www.eaglecentral.ca :: The original and best browser access to CadSoft EAGLE support forums.  Supported by EAGLE licenses purchased through us :: http://www.eaglelicenses.com

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jsantosrico
    0 jsantosrico over 9 years ago in reply to rachaelp

    Thanks Rachael,

     

    that will do the trick, although as you mention is not exactly what i need, I really don't mind that the numbering is in the hundreds.

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

    On 12/12/2016 11:01 AM, Joel Santos Rico wrote:

    I would like to know if it's possible to change the part number formatting. In particular, I would like to know if it's possible to pad the numbers so instead of getting R1, R2,... I can get R01, R02,....

     

    I ask this because it's a bit annoying to short my BOMs and get R1, R11, R12, ..., R19 and then R2, R20, R21, ..., R3 and so on.

     

    Thanks!

     

    --

    To view any images and attachments in this post, visit:

    https://www.element14.com/community/message/210932

     

     

    The reason this happens is because the sort order is determined by

    what's called an "alpha sort", where each character in a string is

    compared to its corresponding character in a second string based on the

    ASCII value of each character.  (To be complete, other character sets

    may be used based on locale.)  There is no interpretation of the meaning

    of each character (digit vs. letter).  Since the comparison is done on a

    character by character basis, all the 1's will sort ahead of all the

    2's, for each character position.  i.e. the comparison does not try to

    interpret the value of a string of digits.

     

    Thus, R1, R10, R123, R19, R1.)

     

    For the devs:

     

        Man page: http://man7.org/linux/man-pages/man3/strverscmp.3.html

     

        strverscmp(3) is available when GNUSOURCE is defined.  This should

        allow it to be pulled from glibc on demand on linux platforms.  I'm

        not sure where this falls on Mac or Windows machines.

        Alternatively, just include the source in the build.

     

        Source can be found at:

        https://opensource.apple.com/source/bison/bison-14/lib/strverscmp.c

        and many other places.

     

    As for implementation in the User Language, I would suggest adding

    strverscmp() to the list of builtin functions.

     

    Also, a variant of the builtin ULP sort() function, perhaps called

    sortver(), can use the above comparison function to determine sort order.

     

    The icing on the cake would be to enhance the builtin fileglob()

    function to allow a version sort on file names, just as versionsort(3)

    does for DIR entries retrieved by scandir(3).

    See: http://man7.org/linux/man-pages/man3/versionsort.3.html

     

        Syntax

            int fileglob(string &array[], string pattern[, ALPHA_SORT |

        VERSION_SORT]);

     

        Builtin constants of appropriate value can be added accordingly.

        The default would be an alpha sort to maintain backward

        compatibility of this function.

     

    In summary, it would be really nice to have a sortver() function.  While

    Joel, the original poster, described a problem, I would like to ask for

    the above modifications to the ULP, namely:

     

     

    • add strverscmp() to the list of builtin string functions,

     

    • add sortver() as a function that does the same thing as sort()

        except that it would use strverscmp to compare two elements of an

        array, and

     

    • modify fileglob() to accept an optional third argument indicating

        whether the resulting set of file names is sorted cannonically or by

        version.

     

    Ideas?

     

    I wish all a happy and prosperous new year!

     

    Best regards,

        - Chuck

     

     

    Attachments:
    7380.att1.html.zip
    • 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 © 2026 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