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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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) Reaching parts in 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 Suggested Answer
  • Replies 2 replies
  • Answers 1 answer
  • Subscribers 171 subscribers
  • Views 334 views
  • Users 0 members are here
  • ulp
  • attribute
Related

Reaching parts in ulp

electrodevab
electrodevab over 10 years ago

Hi,

 

I am trying to write an ulp but ran into trouble.

 

Currently in the ULP I have an array containing strings with component names from the schematic. (compArray[i])

 

In my ULP I need to go into these (in the array) components and add attributes with a predefined name and value. How do I access each component and its property to add the attrubutes?

 

Have a nice day,

 

Best regards,

Tomas Bergh

  • Sign in to reply
  • Cancel
  • autodeskguest
    0 autodeskguest over 10 years ago

    On 24.06.2015 08:15, Tomas Bergh wrote:

    Hi,

     

    I am trying to write an ulp but ran into trouble.

     

    Currently in the ULP I have an array containing strings with component

    names from the schematic. (compArray[i])

     

    In my ULP I need to go into these (in the array) components and add

    attributes with a predefined name and value. How do I access each

    component and its property to add the attrubutes?

     

    ULP can only do read only functions on the design, but it can exit with

    a string containing commands, so you simple have to build a large string

    with all the commands that is required to change the attributes, and at

    the end of the ULP, pass the commands with the function exit(string).

    For multiple commands, separate them with semicolon.

     

    I usually build a command array and exit(strjoin(commands,';'));

     

     

     

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

    Thank you!

    It seems like this is a feasible way for getting around the first issue.

    Unfortunately Eagle is expecting a mouseclick (for placing the visible attribute) after using the attribute command (ex. attribute R100 attribName attribValue)

    In my code I used this: commands[i] = "attribute" + " " + compArray[i] + " " + attribName + " " + attribValue)

    So I am stuck here again. It also seems like that the attribute is visible by default.

    Best regards,

    Tomas Bergh

    • 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