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) ATTRIBUTE command for parts in another sheet
  • 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
  • Replies 4 replies
  • Subscribers 179 subscribers
  • Views 914 views
  • Users 0 members are here
Related

ATTRIBUTE command for parts in another sheet

jpieper
jpieper over 11 years ago

I'm working on a ULP for which I would like to set an attribute on parts spread across multiple sheets.  I've run into a problem, where I can't figure out how to set any attributes on parts which are present on anything but the currently active sheet.

 

The problem also appears just writing commands in the editor.  If you do.

 

ATTRIBUTE C10 ATTNAME 'stuff'

 

If C10 is on the current sheet it works, otherwise a dialog pops up that reports: Invalid part or gate name 'C10'.

 

If you first switch to the correct sheet, all works as expected.

 

Is there a way to reference parts in another sheet?

 

Thanks.

  • Sign in to reply
  • Cancel
Parents
  • AnalogNotes
    AnalogNotes over 11 years ago

    This is my main gripe with EAGLE, the way you process selected groups or separate schematic sheets.  It's inverted from the way I want to do it.  Instead of having a selection and searching for the sheet it's on, you have each sheet and you have to search for the selection on that sheet...

     

    I think you'll have to loop through all sheets:

     

    schematic (S) {

      sheet(SH) {

        # generate script command to edit sheet.  Something like: sprintf(line, "edit .s%d;\n", SH.number); script += line;

        # look for part

        # generate attribute command for part

      }

    }

     

    Unless you want to start accessing the XML directly...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jpieper
    jpieper over 11 years ago in reply to AnalogNotes

    Thanks!  With eagle 6.5, I am not having a problem getting the name of all the parts across all schematics, I just don't seem to be able to figure out what attribute command to generate which will allow me to set them.  In 6.5, I'm using SCH.parts(P) { ... } which does seem to list all the parts across all sheets correctly.

     

    Hmmm, maybe it would be easier for me to mess with the XML directly.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • jpieper
    jpieper over 11 years ago in reply to AnalogNotes

    Thanks!  With eagle 6.5, I am not having a problem getting the name of all the parts across all schematics, I just don't seem to be able to figure out what attribute command to generate which will allow me to set them.  In 6.5, I'm using SCH.parts(P) { ... } which does seem to list all the parts across all sheets correctly.

     

    Hmmm, maybe it would be easier for me to mess with the XML directly.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • AnalogNotes
    AnalogNotes over 11 years ago in reply to jpieper

    OK, that clarifies a bit for me.  You might want to use the instances() loop of the part where you can find the sheet variable.  I haven't actually tested it, but I think you'll still have to have a pair of commands for each attribute:

     

    switch to the particular sheet  ("edit .s1;", "edit .s2;", etc)

    set the attribute of the part on that sheet

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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