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) Selecting objects 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
  • Replies 2 replies
  • Subscribers 179 subscribers
  • Views 442 views
  • Users 0 members are here
Related

Selecting objects in ULP

autodeskguest
autodeskguest over 9 years ago

I'm updating a ULP that moves around text strings to simplify the process

of cleaning up the silkscreen and documentation layers after routing.

 

It has always bothered me that some objects, like text strings, can only be

identified by their coordinate in commands like MOVE.

 

First, is this really true?  If so, that seems dangerous since you're

relying on multiple objects not having the same coordinate.  To minimize

the chance of error, I make sure only one layer at a time is displayed.

Multiple text strings shouldn't be at the same place, but stuff happens,

even if just by accident.

 

If it is not possible to unambiguously identify specific text strings in

command like MOVE, ROTATE, and the like, then something like a unique "ID"

or "handle" would be useful in the UL_TEXT data structure.  The commands

would be able to accept that in place of the starting coordinate.  The

syntax around this doesn't need to be pretty, since it would only be

intended for writing by a ULP.

 

Any other suggestions how to perform actions on a particular text string by

writing a script from a ULP?

--

Web access to CadSoft support forums at www.eaglecentral.ca.  Where the CadSoft EAGLE community meets.

 

  • Sign in to reply
  • Cancel
  • autodeskguest
    autodeskguest over 9 years ago

    On 22.09.2016 15:33, Olin Lathrop wrote:

    I'm updating a ULP that moves around text strings to simplify the process

    of cleaning up the silkscreen and documentation layers after routing.

     

    It has always bothered me that some objects, like text strings, can only be

    identified by their coordinate in commands like MOVE.

     

    First, is this really true?  If so, that seems dangerous since you're

    relying on multiple objects not having the same coordinate.  To minimize

    the chance of error, I make sure only one layer at a time is displayed.

    Multiple text strings shouldn't be at the same place, but stuff happens,

    even if just by accident.

     

    If it is not possible to unambiguously identify specific text strings in

    command like MOVE, ROTATE, and the like, then something like a unique "ID"

    or "handle" would be useful in the UL_TEXT data structure.  The commands

    would be able to accept that in place of the starting coordinate.  The

    syntax around this doesn't need to be pretty, since it would only be

    intended for writing by a ULP.

     

    Any other suggestions how to perform actions on a particular text string by

    writing a script from a ULP?

     

     

     

    You can use the setgroup() function to group unique objects selected

    from different parameters in the ULP code, then moving the [single item

    in] group. But beware of the bugs. 7.6.4beta got the lastest ingroup

    bugs cleaned out.

     

    But I'm not sure if this will make your problems easier.

     

     

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

    Morten Leikvoll wrote on Thu, 22 September 2016 10:27

    You can use the setgroup() function to group unique objects selected

    from different parameters in the ULP code, then moving the [single item

    in] group. But beware of the bugs. 7.6.4beta got the lastest ingroup bugs

    cleaned out.

     

     

    Interesting idea, but that only allows for creating a single group.  Since

    things can't actually be changed from inside a ULP, it has to write a

    script, which is executed automatically after the ULP.  However, these

    functions only seem to control the grouping during the ULP, so could create

    at most one group that a script can act on.  My ULP is for moving around

    all the NAME and DOCU text of all the devices in a board.

    --

    Web access to CadSoft support forums at www.eaglecentral.ca.  Where the CadSoft EAGLE community meets.

     

    • 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 © 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