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) How do I delete the wires in a layer by 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 4 replies
  • Subscribers 178 subscribers
  • Views 723 views
  • Users 0 members are here
  • ulp
Related

How do I delete the wires in a layer by ULP?

fabiodl
fabiodl over 12 years ago

I am new to ULP.

I can count how many wires there're in a layer by this code

 

int i=0;

string buff;

board(B) {

  B.wires(w) {

    if (w.layer==46){

      i++;

    }

    }

  }

sprintf(buff,"%d wires",i);

dlgMessageBox(buff);

 

 

What I would like is deleting the wires of layer 46 by a ULP. Is there any built in function for that? Something like

  delete(w)

?

If it is not possible, what other approach could I use to delete the content of a layer programmatically?

  • Sign in to reply
  • Cancel

Top Replies

  • autodeskguest
    autodeskguest over 12 years ago +1
    On 08/10/13 15:52, Fabio DL wrote: What I would like is deleting the wires of layer 46 by a ULP. Is there any built in function for that? Something like delete(w) ? If it is not possible, what other approach…
  • autodeskguest
    autodeskguest over 12 years ago in reply to fabiodl +1
    On 09/10/13 17:54, Fabio DL wrote: Thank you, I tried looking at scripts. Still I didn't progress much. DISPLAY NONE 46; GROUP ALL; but then DELETE *, DELETE ALL or DELETE GROUP do not seem to exists.…
  • autodeskguest
    0 autodeskguest over 12 years ago

    On 08/10/13 15:52, Fabio DL wrote:

    What I would like is deleting the wires of layer 46 by a ULP. Is there

    any built in function for that? Something like

       delete(w)

    ?

    If it is not possible, what other approach could I use to delete the

    content of a layer programmatically?

     

    ULPs are a bit... unexpected in that there are no facilities in the

    language for making any change at all to the design. You just can't.

     

    However, you can do something after the event. If your ULP passes a

    string to the "exit" function on completion, then Eagle will execute

    that string as if you'd typed it in the command box. So either

    accumulate all your deletion commands into a string and end with:

     

       exit(cmd);

     

    or write them to a script file and end with:

     

       exit("SCRIPT '" + scriptfile + "';");

     

    There are examples of both in the ULPs supplied with Eagle.

     

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • fabiodl
    0 fabiodl over 12 years ago in reply to autodeskguest

    Thank you, I tried looking at scripts. Still I didn't progress much.

     

    DISPLAY NONE 46;

    GROUP ALL;

     

    but then DELETE *, DELETE ALL or DELETE GROUP do not seem to exists. Do you know any command that serves the purpose?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 12 years ago in reply to fabiodl

    On 09/10/13 17:54, Fabio DL wrote:

    Thank you, I tried looking at scripts. Still I didn't progress much.

     

    DISPLAY NONE 46;

    GROUP ALL;

     

    but then DELETE *, DELETE ALL or DELETE GROUP do not seem to exists. Do

    you know any command that serves the purpose?

     

    --

    To view any images and attachments in this post, visit:

    http://www.element14.com/community/message/91037#91037

     

    Check the help, under "Editor Commands -> Command Syntax"

     

    If you were doing this operation by hand, you would set only layer 46

    shown, select the group tool and sweep over the whole lot. That much you

    have done. Then you would select the delete tool and click the right

    mouse button (with the control key if you're on the V5 user interface -

    I'm still mostly using V4.15) anywhere on screen.

     

    That help page explains the syntax, but for "delete tool

    ctrl-right-click" you want:

     

    DELETE (C> 0 0);

     

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • fabiodl
    0 fabiodl over 12 years ago in reply to autodeskguest

    Thank you, sorry I didn't notice it.

    • 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