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) ULP and script capabilities question
  • 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 189 subscribers
  • Views 1242 views
  • Users 0 members are here
  • ulp
  • scripting
  • libraries
Related

ULP and script capabilities question

gwideman
gwideman over 10 years ago

I'm trying to scope out whether Eagle's scripting or ULP environments can help with my recently posed question "Library copy and rename device procedure?".

 

So I'd like to know whether and how either of these environments can create, open, write and close eagle libraries. And I'm likely to need to use eagle's iterators (aka "loop members"), so this probably needs to focus on the ULP realm, unless a ULPs can run commands. So...

 

  1. I see that the scripting commands include OPEN and WRITE, but I didn't see a command to create a new library.
  2. I didn't see any ULP functions that can create, open, write, or close a library. Did I miss something?
  3. Perhaps ULPs can run commands? But I didn't see any ULP function to run a command. Again, did I miss something?

 

Thanks!

 

-- Graham

  • Sign in to reply
  • Cancel
  • gwideman
    0 gwideman over 10 years ago in reply to e14 Contributor

    ALF_Z wrote:

     

    Am 05.08.2015 um 08:04 schrieb Graham Wideman:

     

    1. I see that the scripting commands include OPEN and WRITE, but I

    didn't see a command to create a new library.

     

    OPEN newname.lbr  -->>  opens a new lbr

    WRITE;            -->> save the lbr

     

    2. I didn't see any ULP functions that can create, open, write, or close

    a library. Did I miss something?

     

    A ULP con only generate a string to return to eagle, or write a SCRIPT

    and return the SCRIPT filename (as string) to Eagle.

     

    3. Perhaps ULPs can run commands? But I didn't see any ULP function to

    run a command. Again, did I miss something?

     

    string commandstring = "OPEN newname.lbr";

    exit(commandstring);

     

    HELP -> User Langauge -> Builtins -> Builtin-Functions -> exit();

     

     

    Thanks Alfred, that was very helpful.

     

    So, combined with script command RUN 'ulpname', it seems that:

    • a script can call a ULP, which can later return to the running script
    • a ULP, can jump to a new script.
    • but... a ULP can't call to a script which then returns to the ULP

     

    That makes it a little difficult to use a ULP iterator (member loop) to repeatedly perform a script command. Not sure if that's fatal, but it's interesting.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 10 years ago

    Am 05.08.2015 um 08:04 schrieb Graham Wideman:

    I'm trying to scope out whether Eagle's scripting or ULP environments

    can help with my recently posed question "Library copy and rename device

    procedure? (/thread/44708/l/library-copy-and-rename-device-procedure)".

     

    So I'd like to know whether and how either of these environments can

    create, open, write and close eagle libraries. And I'm likely to need to

    use eagle's iterators (aka "loop members"), so this probably needs to

    focus on the ULP realm, unless a ULPs can run commands. So...

     

    1. I see that the scripting commands include OPEN and WRITE, but I

    didn't see a command to create a new library.

     

    OPEN newname.lbr  -->>  opens a new lbr

    WRITE;            -->> save the lbr

     

    2. I didn't see any ULP functions that can create, open, write, or close

    a library. Did I miss something?

     

    A ULP con only generate a string to return to eagle, or write a SCRIPT

    and return the SCRIPT filename (as string) to Eagle.

     

    3. Perhaps ULPs can run commands? But I didn't see any ULP function to

    run a command. Again, did I miss something?

     

    string commandstring = "OPEN newname.lbr";

    exit(commandstring);

     

    HELP -> User Langauge -> Builtins -> Builtin-Functions -> exit();

     

     

    ***

    Um das Original zu lesen, und auch zuverlässig angehängte Dateien

    bereitstellen zu können, benutzen Sie news.cadsoft.de und einen

    funktionierenden News-Reader wie Thunderbird!

    ***

    Mit freundlichen Grüßen / Best regards

     

    Alfred Zaffran

    --

    ______________________________________________________________

    Alfred Zaffran              Support

    CadSoft Computer GmbH       Hotline:   08635-698930

    Pleidolfweg 15              FAX:       08635-698940

    84568 Pleiskirchen          eMail: <alf@cadsoft.de>

                                 Web:   <www.cadsoft.de>

    Registergericht: Amtsgericht Traunstein HRB 5573

    Geschaeftsfuehrer: Mark Whiteling

    ______________________________________________________________

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • gwideman
    0 gwideman over 10 years ago in reply to Joop14

    Joop14 wrote:

    , you can call an external program (written in C)

    that will do the task. The good news is that Eagle stores everything in XML.

     

    Have a look here for an example of such a trick: http://www.teuniz.net/eagle/eaglelibcheck/

     

    ... thanks Joop. Yes I'm aware that Eagle's files are a specialization of XML format... and if I was going to do that I'd probably choose a language that deals with strings nicely, has XML libraries etc, like Python or Java.

     

    However, going that route is not just a matter of reading and writing XML. There are a number of cross dependencies in an Eagle file, notably the references (by name) from device to symbols and packages. Using the Rename command on a package (for example) within Eagle takes care of also updating the devices that use it.

     

    For external code, it might or might not be daunting to discover all those dependencies and implement them.

     

    So I thought I should at least see if I'd missed some functionality within Eagle's programming environment which would make reinventing those wheels unnecessary.

     

    The example you pointed to is interesting.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Joop14
    0 Joop14 over 10 years ago

    Graham Wideman wrote:

     

    1. I didn't see any ULP functions that can create, open, write, or close a library. Did I miss something?

     

    No, you didn't.

     

    But if you are familiar with programming in C (you should in order to be able to write an ULP), you can call an external program (written in C)

    that will do the task. The good news is that Eagle stores everything in XML.

     

    Have a look here for an example of such a trick: http://www.teuniz.net/eagle/eaglelibcheck/

     

    Regards,

     

    Joop

    • 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