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
      •  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) Assigning different library to device in schematic using ULP
  • 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 Not Answered
  • Replies 3 replies
  • Subscribers 180 subscribers
  • Views 478 views
  • Users 0 members are here
Related

Assigning different library to device in schematic using ULP

bobbeird
bobbeird over 7 years ago

Hi,

I'm new to Eagle(v7.7) and new to these forums as well. I've searched for an answer to my question but have not had much luck so here I am.

 

Our current process, during development, is to use an unverified library for any new components, and a verified library for components already in use in our other products (we've used them, the footprints are correct, the part numbers are correct, etc etc).  Part of the release process is to review those new components and move them into the verified library. To avoid duplication and errors, the version in the unverified library gets deleted at this time. This is all well and good, except the component on the schematic will still reference the unverified library, where the device no longer exists. Manually replacing each component on the schematic with one from the verified library would work, but it doesn't sound like a whole lot of fun. My thought was to write a ULP to handle this. I can successfully identify every device using the unverified library using :

 

schematic(S)

{

     S.parts(P)

     {

          if(P.device.library == "Unverified")     <<~~~~~ Unverified is the actual name of the library in this example...   Unverified.lbr

 

 

I tested this and it successfully identified every component referencing that library. My logical next step (that is apparently not so logical) was to simply assign the new library name after the if statement. So I did this:

schematic(S)

{

     S.parts(P)

     {

          if(P.device.library == "Unverified")

          {

               P.device.library = "Verified";

          }

     }

}

 

Unfortunately, I get a syntax error on the line P.device.library = "Verified";        but I don't know why. Any help would be greatly appreciated.

 

Best regards,

Bob

  • Sign in to reply
  • Cancel
Parents
  • WarrenBrayshaw
    0 WarrenBrayshaw over 7 years ago

    Hi Bob

    Give the attached ULP a try.(zipped)

    It assumes that all unverified parts used on the schematic are now in the verified folder.

    Assuming "unverified" and "verified"are not the real names, you get to select from the list of library names used in the schematic. Then you choose the destination library name. If its not already in use in the schematic you can "Browse" for it .

    When displayed along side the browse button, that library will be the new name used . If you want to change your mind at this point, click in the right hand 'target' list and the browsed for selection will be cleared and you will be using the one selected in the right hand list.

     

    Enjoy

    Warren

    Attachments:
    change_library_name _of_verified_part.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bobbeird
    0 bobbeird over 7 years ago in reply to WarrenBrayshaw

    Thanks Warren! I was hoping for a point in the right direction....a working ulp is even better! I'll give it a shot asap.

     

    Just a follow-up... I tested the ULP and it works perfectly for what I wanted to do. Thanks again!

    Bob

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • bobbeird
    0 bobbeird over 7 years ago in reply to WarrenBrayshaw

    Thanks Warren! I was hoping for a point in the right direction....a working ulp is even better! I'll give it a shot asap.

     

    Just a follow-up... I tested the ULP and it works perfectly for what I wanted to do. Thanks again!

    Bob

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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