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 create holes and positions from imported DXF
  • 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 21 replies
  • Answers 2 answers
  • Subscribers 180 subscribers
  • Views 3937 views
  • Users 0 members are here
  • cnc
  • holes
  • eagle pcb
  • led
  • layer
  • polygon
Related

How do I create holes and positions from imported DXF

shearder
shearder over 9 years ago

Hi All

 

I have a panel that i have designed which has switches, buttons, knobs (rotaries), LEDs and a LCD screen. I have imported the DXF version of this into Eagle on the dimension layer. I will machine a 300mmx300mm Double sided board.

 

What i want to know: Some circles on the DXF are HOLES some are positions for LEDs.

 

How do i go about selecting a circle and making it a HOLE without redrawing a polygon and TRYING to align it. Also, how do i move other circles to a different layer for positioning of the LEDs?

 

Hope that makes sense.

 

Thanks in advance.

  • Sign in to reply
  • Cancel

Top Replies

  • autodeskguest
    autodeskguest over 9 years ago in reply to shearder +1 suggested
    Am 27.05.2016 um 12:46 schrieb Sean Hearder: That does make a lot of sense. So layer 45 isn't actually the drl layer for component holes but cut outs? I will try working with this over the weekend Thanks…
  • rachaelp
    rachaelp over 9 years ago +1 suggested
    Hi Sean, I posted this on your other thread in the suggest forum first then saw this so I am reposting in this thread which seems more live. Anyway, I thought this was an interesting query so decided to…
Parents
  • rachaelp
    0 rachaelp over 9 years ago

    Hi Sean,

     

    I posted this on your other thread in the suggest forum first then saw this so I am reposting in this thread which seems more live. Anyway, I thought this was an interesting query so decided to write a ULP to do this. Save the code below as circleToHole.ulp.

     

    #usage "en: Adds a hole at the location and size of the selected circle\n"

               "run circleToHole install - to install to the boards context menu"

     

     

    if (argv[1] == "install") {

        exit("edit .brd; set context circle 'Place hole (Non-PT)...' 'run circleToHole';"

             "           set context circle 'Place hole (PT)...' 'run circleToHole plated';");

    } else {

     

       string cmd="";

       string grid="mil";

     

       if (board) {

          board(B) {

             if (B.grid.unit == GRID_UNIT_MIC) {

                grid = "mic";

             } else {

                if (B.grid.unit == GRID_UNIT_MM) {

                   grid = "mm";

                } else {

                   if (B.grid.unit == GRID_UNIT_INCH) {

                      grid = "in";

                   }

                }

             }

             B.circles(C) {

                if (ingroup(C)) {

                   if (argv[1] == "plated") {

                      sprintf(cmd, "GRID mil; VIA %f Round 1-16 (%f %f); CHA DRI %f (%f %f); GRID %s;", 2.0 * u2mil(C.radius), u2mil(C.x), u2mil(C.y), 2.0 * u2mil(C.radius), u2mil(C.x), u2mil(C.y), grid);

                   } else {

                      sprintf(cmd, "GRID mil; HOLE %f (%f %f); GRID %s;", 2.0 * u2mil(C.radius), u2mil(C.x), u2mil(C.y), grid);

                   }

                }

             }

          }

       }

     

       exit(cmd);

     

    }

    Then in the board do:

     

         run circleToHole install <return>

     

    Then two context menu items will appear when you right click on circles in imported DXF's relating to hole positions (actually any circle but I can't easily differentiate). You can then select to insert a non-plated or a plated hole (which is just a via).

     

    Best Regards,

     

    Rachael

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • shearder
    0 shearder over 9 years ago in reply to rachaelp

    WOW thank you so much. I will give it a try over this weekend. It will surely come in handy going forward as i get numerous requests for custom panels and the truth is it becomes difficult with the number of wires i sometimes need so a circuit board with tracks rather than wires will be much better then i can also lay SMD LEDs for back lighting and holes to mount rotaries and the panel just attaches to the circuit board.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • shearder
    0 shearder over 9 years ago in reply to rachaelp

    WOW thank you so much. I will give it a try over this weekend. It will surely come in handy going forward as i get numerous requests for custom panels and the truth is it becomes difficult with the number of wires i sometimes need so a circuit board with tracks rather than wires will be much better then i can also lay SMD LEDs for back lighting and holes to mount rotaries and the panel just attaches to the circuit board.

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