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
Open Source Hardware
  • Technologies
  • More
Open Source Hardware
Blog Working with KiCad 7: Importing EAGLE files
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Open Source Hardware to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 27 Jun 2023 4:00 PM Date Created
  • Views 29695 views
  • Likes 12 likes
  • Comments 9 comments
  • eagle
  • kicad 7
  • eagle-cad
  • kicad 6
  • kicad
  • eaglecad
  • eagle_cad
Related
Recommended

Working with KiCad 7: Importing EAGLE files

shabaz
shabaz
27 Jun 2023
Working with KiCad 7: Importing EAGLE files

Table of Contents

  • Introduction
  • Importing the project
  • Enabling Schematic and PCB Updates
  • Resolving PCB Problems
    • Zones (Copper planes)
    • Rule Areas (Keepout regions)
    • Component Footprints
  • Resolving Schematic Problems
    • Text Sizes
    • Drawing Frame
  • Summary

Introduction

Having used EAGLE CAD for several years, I had a set of projects, a select few of which I wanted to be able to import into KiCad and modify. Fortunately, KiCad has a built-in translator for this, but there are a few things to be aware of. The entire process can never be fully automated, because there isn’t a 1:1 mapping of features between the different CAD systems. This blog post covers some of the issues that may come up, and how to resolve them.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Note: The video is rather long (20 minutes) since there was much to cover. It's not a beginner video for people migrating from EAGLE. If you're a newcomer to KiCad, then perhaps this KiCad 6 quick start video could be more useful first (KiCad 6 information is compatible with KiCad 7). Incidentally, the example project used in the video is described here: Cyclops-1000: An Electronic Eye for Rotational Speed Measurement  

Importing the project

The first part is very straightforward. Simply go to File->Import Non-KiCad Project->EAGLE Project and then select the EAGLE schematic file (the EAGLE PCB file will automatically be loaded). Select a destination folder for the converted KiCad project.

Once you do that, the schematic will be converted and then a window appears with EAGLE and KiCad layer names that need to be mapped.

image

Most of the layers can be auto-mapped, however some may need to be manually done. The trouble is, you might not know which layers need the manual work, until you click OK, and then you can’t go back in the workflow. It will be an iterative process, learning which layers you missed the first time round. In the example screenshot above, it was determined that the project happened to use the EAGLE Milling layer, so that needed to be manually mapped to the KiCad Edge.Cuts layer.

Click on OK, and you’ll see the PCB has now been converted too.

Enabling Schematic and PCB Updates

If you plan on editing the project in KiCad, then at some point, the Update PCB with changes made to the schematic icon (shown in the screenshot below) will need to be clicked. I encountered a problem with that! If that icon is clicked, the positions of all the component footprints are reset. They all move off the board! This is a major problem because there could be dozens or hundreds of components to re-position back to where they were before.

image

The only solution I know of is to initially not press that button! You can capture the position coordinates of every component footprint to a file, and then press that button, and then move the components back programmatically. Fortunately, this is straightforward using KiCad’s Python scripting feature.

To do that, save the ktools.py file into a folder, for instance C:/development/ktools :

image

Next, in the KiCad PCB editor window, click on Tools->Scripting Console to bring up a Python command prompt. Type the following (note: use forward-slashes for the path!):

import sys
sys.path.insert(1, "c:/development/ktools")
import ktools as k


Now you can type the following command to print out a list of the coordinates of every component footprint on the board:

k.list_coords()

image

Although the printed list is useful information to browse through, this isn’t what is needed. Instead, the list_coords function can be called with a parameter to force the output to be in a Python format. Type:

k.list_coords(format='python')

Now you’ll see a load of output that is actually a Python program.

image

Copy-paste the output into a new file, called (say) myfix.py and save it into the same folder as the ktools.py file.

Now click on the Update PCB with changes made to the schematic icon, and you’ll see that the components move off their positions:

image

This is not a problem, since now they can be restored to their correct positions using the new myfix.py file. Type:

import myfix
myfix.move_items()

Everything should be back to normal! Now, you can press the Update PCB button at any time, and the components will remain where they should be.

Resolving PCB Problems

Click on Inspect->Design Rules Checker and run the DRC.

image

Zones (Copper planes)

You may find errors reported on copper planes (zones), and they are easy to fix by double-clicking on the zone to bring up the Properties window, and then setting the Clearance value to something sensible (for instance, 0.3 mm or more). Note that with KiCad 7, there is a Properties pane on the left side, so you don’t need to double-click for the Properties window, you could make the adjustment in the pane.

image

Rule Areas (Keepout regions)

You may find that EAGLE keepout areas, intended to prevent copper pours, may have defaulted in KiCad to keeping out pads and traces too. This is easy to fix by double-clicking on the keepout area, and unchecking things:

image

Component Footprints

The screenshots below show what might also be typical problems, regarding component footprints. In EAGLE, shaped pads are really just shaped elements and milling outlines stacked on top of pads, whereas KiCad natively supports pads and slotted cut-outs all integrated into the single pad element.

image

The best thing to do is to edit the component, get rid of the EAGLE elements and fix it properly, using proper KiCad pad techniques (in particular, the Pad Edit Mode, invoked by pressing Ctrl-E. If you’ve not used this function before, check out the video above). The end result will be decent-looking pads, that were not ever achievable with EAGLE!:

image

Resolving Schematic Problems

There are a couple of minor issues that could occur with EAGLE imported schematics.

Text Sizes

If you decide to modify the schematic, there is a possibility that KiCad component symbols will have a different text size compared to the imported EAGLE text. The screenshot below shows that the EAGLE imported resistor R1 has slightly larger text than the newly added resistor R9.

image

An easy way to solve this is to perform a text search-and-replace in the KiCad schematic file. For instance, for the example schematic in the screenshot above, I replaced the text 1.778 1.5113 with 1.27 1.27 and that resolved it.

image

Drawing Frame

If the KiCad file has a drawing frame, then you’ll notice an irritating problem in the KiCad schematic. If you try to select any component, it is very easy for the frame to get selected instead since it surrounds the entire schematic area.

image

I don’t know of a good solution, except to delete the frame. If you know of a better solution, please let me know!

Summary

If there are legacy EAGLE projects that you would really like to edit within KiCad, then it is possible to use the built-in EAGLE import capability, however, you should expect to have to make some changes manually. You may need to use a Python script and also text search-and-replace, but that is not difficult.

In some cases, there may not be much extra that needs to be done, but it depends on what EAGLE features were used in the project. In particular, EAGLE has a very different (and awkward) approach for complex component footprints, which is best resolved by re-implementing parts of the footprints.

Thanks for reading!

  • Sign in to reply

Top Comments

  • shabaz
    shabaz over 2 years ago in reply to anniel747 +2
    Thanks! I'm way below other contributors, I can't remember the last time I did a project or challenge. I just write what comes to mind or what I'm working on. I learned through work, that one should…
  • shabaz
    shabaz over 1 year ago in reply to ggabe

    I'm not sure when the XML format came in, I was using Eagle 7 in the past, which supported it. I hope all worked out in the end with your Eagle->KiCad conversion!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ggabe
    ggabe over 1 year ago

    The older binary formatted Egale files gave me a bit of headache first, as KiCad is only importing XML formatted Eagle.

    After re-saving the Eagle file in Fusion360 in the 9.x format if allowed KiCad to import it. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Fred27
    Fred27 over 2 years ago

    Nice to see your video linked to by Hackaday recently.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 2 years ago

    Some more tips on the EAGLE import are at the comments here:

    https://hackaday.com/2023/07/01/importing-eagle-projects-into-kicad-7-and-how-to-fix-them/

    It turns out the Python manipulation that I did wasn't required, there is a way to prevent KiCad moving the footprints by changing a couple of checkbox settings when clicking "Update PCB".

    Also there are some other useful tips there, for instance regarding text sizes adjustments.

    The Python method might still be a handy option, since it means the problem in the project is permanently fixed without having to set the checkboxes to non-default settings whenever that project is worked on - I don't know for sure). In any case, the script may be useful for editing in the future to do other stuff with component positions perhaps.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 2 years ago in reply to genebren

    Hi Gene,

    Thanks! If you ever need any help with moving to KiCad and get stuck, just shout out, and I'd be happy to help, and I'm sure between all of us KiCad users on the site, hopefully, we can resolve any issue.

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