Skip to content

Importing Files

Marius Stanciu edited this page Oct 29, 2026 · 1 revision

FlatCAM Evo imports Gerber, Excellon, G-code, vector files, PDF, images and the native board files of several PCB programs. Each import creates objects in the active project.

Where to find it

  • File > Open > Open Gerber (Ctrl+G), Open Excellon (Ctrl+E), Open G-Code, Open Project (Ctrl+O).
  • File > Import: the vector files and the board files, one entry for each format.
  • Ctrl+I (Import File): opens the Import dialog. It lists every import in one place.
  • Project selector: right-click it, then Import... to open the Import dialog.
  • Drag and drop: drop the files on the main window. See Drag and drop.

Screenshot placeholder: images/Importing-Files-1.png - the File > Import submenu with the vector entries and the board entries.

Screenshot placeholder: images/Importing-Files-2.png - the Import dialog with the group tree on the left and the description on the right.

Quick start

  1. Press Ctrl+I to open the Import dialog.
  2. Select a format in the tree. The description shows what the import creates.
  3. Press Run or double-click the entry. Select the file in the file dialog.
  4. Check the new objects in the Project tab.

Parameters

Import dialog

The dialog shows the imports in three groups. The group Raster Images appears only when the Image Import plugin is loaded. The entry PDF appears only when the PDF-Import plugin is loaded.

Group Entry File extension Creates
Vector Files SVG as Geometry .svg Geometry object
Vector Files SVG as Gerber .svg Gerber object
Vector Files DXF as Geometry .dxf Geometry object
Vector Files DXF as Gerber .dxf Gerber object
Vector Files HPGL2 as Geometry .plt Geometry object
Vector Files PDF .pdf Gerber and Excellon objects
Raster Images Image .bmp .png .jpg .jpeg Geometry or Gerber object
PCB Boards Altium PCB .PcbDoc Gerber and Excellon objects
PCB Boards Proteus PCB .pdsprj Gerber and Excellon objects
PCB Boards KiCad PCB .kicad_pcb Gerber and Excellon objects
PCB Boards Sprint Layout 6 .lay6 Gerber and Excellon objects
PCB Boards Eagle Board .brd (Eagle 6 and later, XML) Gerber and Excellon objects
PCB Boards OrCAD/Allegro Board .brd (binary) Gerber and Excellon objects
PCB Boards DipTrace PCB .dip Gerber and Excellon objects

The dialog has a filter box. Type a part of an entry name to show only the matching entries.

File > Import menu

The File > Import submenu has these entries, in this order: SVG as Geometry Object, SVG as Gerber Object, DXF as Geometry Object, DXF as Gerber Object, HPGL2 as Geometry Object, Altium PCB (.PcbDoc), Proteus PCB (.pdsprj), KiCad PCB (.kicad_pcb), Sprint Layout 6 (.lay6), Eagle Board (.brd), OrCAD/Allegro Board (.brd), DipTrace PCB (.dip).

Gerber and Excellon

Import Menu entry Shortcut Creates
Gerber File > Open > Open Gerber Ctrl+G Gerber object
Excellon File > Open > Open Excellon Ctrl+E Excellon object

The parse and plot options of these imports come from the Gerber and Excellon preferences. See Preferences Gerber and Preferences Excellon.

Gerber import options (Preferences > Gerber)

Each row names the preference key in defaults.py.

Preference Description Default
gerber_def_units Units of a Gerber file that does not declare its units. IN
gerber_def_zeros Zero suppression of a Gerber file that does not declare it. L = leading zeros. L
gerber_circle_steps Segments of a full circle. Used when the steps mode is fixed. 64
gerber_circle_steps_mode adaptive: the segments follow the radius and the tolerance. fixed: every circle has the number of steps above. adaptive
gerber_circle_tolerance Maximum distance of a circle from its polygon, in micrometers. Used when the mode is adaptive. 2.0
gerber_clean_apertures Removes the apertures that the file does not use. True
gerber_simplification Simplifies the polygons after the import. False
gerber_simp_tolerance Tolerance of the simplification, in mm (or inch). 0.0005
gerber_plot Plots (shows) the object after the import. True
gerber_solid Draws the polygons as solid colors. True
gerber_multicolored Draws the polygons in different colors. False
gerber_plot_on_select Replots a selected object above the other objects. True
gerber_use_buffer_for_union Uses a buffer for the union of the polygons. True
gerber_extra_buffering Adds an extra buffer step to the union. False
gerber_buffering Buffering method of the polygons. full
gerber_delayed_buffering Delays the buffering until it is needed. True
gerber_follow Creates a follow object (path) of the Gerber. False
gerber_aperture_display Shows the apertures on the plot. False
gerber_aperture_scale_factor Scale factor of the apertures. 1.0
gerber_aperture_buffer_factor Buffer factor of the apertures. 0.0

The keys gerber_plot_fill, gerber_plot_line, gerber_plot_line_enable, gerber_color_list, gerber_store_color_list, gerber_noncoppermargin, gerber_noncopperrounded, gerber_bboxmargin, gerber_bboxrounded, gerber_exp_* and gerber_save_filters are not import options. They set colors, bounding boxes, exports or file filters.

Excellon import options (Preferences > Excellon)

Preference Description Default
excellon_units Units of an Excellon file that does not declare its units. INCH
excellon_zeros Zero suppression of an Excellon file. T = trailing zeros. T
excellon_format_upper_in Digits before the decimal point, for INCH. Tooltip: default values for INCH are 2:4. 2
excellon_format_lower_in Digits after the decimal point, for INCH. 4
excellon_format_upper_mm Digits before the decimal point, for METRIC. Tooltip: default values for METRIC are 3:3. 3
excellon_format_lower_mm Digits after the decimal point, for METRIC. 3
excellon_merge_fuse_tools Fuses the tools that have the same diameter (the Fuse Tools check box). True
excellon_plot Plots (shows) the object after the import. True
excellon_circle_steps Segments of a full circle for a drill hole. Used when the mode is fixed. 32
excellon_circle_steps_mode adaptive or fixed, as gerber_circle_steps_mode. adaptive
excellon_circle_tolerance Tolerance of the circles in micrometers, as gerber_circle_tolerance. 5.0
excellon_solid Draws the holes as solid colors. True
excellon_multicolored Draws the holes in different colors. False
excellon_update Updates the object when a value changes. True
excellon_optimization_type Path optimization of the drill path. B
excellon_search_time Search time of the path optimization, in seconds. 3
excellon_tools_table_display Shows the tools table of the object. True
excellon_autoload_db Loads the tools database when an object is created. False

The keys excellon_color, excellon_plot_fill, excellon_plot_line, excellon_drill_tooldia, excellon_slot_tooldia, excellon_save_filters, excellon_exp_* and excellon_editor_* are not import options. They set colors, tool defaults, exports or editor settings.

G-Code

Import Menu entry Creates
G-code File > Open > Open G-Code CNCJob object

The G-code parser reads the file and builds a CNCJob object. The G-code text can be edited in the G-Code Editor. See CNCJob Object and GCode Editor.

The G-code file extensions are: cnc, din, dnc, ecs, eia, fan, fgc, fnc, gc, gcd, gcode, hnc, min, mpf, mpr, nc, ncc, ncg, ngc, ncp, out, ply, rol, sbp, tap and xpi.

The G-code import has no options. The parser uses its default settings.

SVG, DXF and HPGL2

Import Menu entry Reads
SVG as Geometry File > Import > SVG as Geometry Object The paths, the shapes and the text of a Scalable Vector Graphics file. Use it for artwork that you mill, cut or engrave. You can select more than one file.
SVG as Gerber File > Import > SVG as Gerber Object The same content. Use it for copper, solder mask or silkscreen artwork that the isolation and copper clearing plugins process.
DXF as Geometry File > Import > DXF as Geometry Object The lines, arcs, circles, polylines, splines and blocks of an AutoCAD drawing.
DXF as Gerber File > Import > DXF as Gerber Object The same content. Use it for copper artwork.
HPGL2 as Geometry File > Import > HPGL2 as Geometry Object The pen moves of an HPGL/2 plot file.

The SVG and DXF menu entries open a file dialog that accepts more than one file. The DXF import of more than one file plots all the objects once, after the last import.

SVG import options

Option Description Default
svg_drill_detect A white circle (0.2 to 6 mm) with a dark stroke becomes an Excellon object, not a Geometry or Gerber shape. True
Circle steps (Gerber preferences) Segments of each circle. The SVG import uses the same circle setting as the Gerber parser, see Gerber import options. gerber_circle_steps_mode adaptive
Units (of the import) The SVG file is read in the units of the application (mm or inch). —

DXF import options

Option Description Default
Circle steps (Gerber or Geometry preferences) Segments of the full circle, also for the POINT disks and the filled circles. The DXF import uses the circle setting of the object kind. see Gerber and Geometry preferences
Text mode stroke draws the glyph outlines as lines. outline makes filled polygons. none skips TEXT, ATTRIB and MTEXT entities. The Import dialog has no control for it. stroke
Drawing units The units of the DXF file come from its $INSUNITS header. A file without units is read in the application units. A drawing that becomes larger than 1 m after the scaling is imported unscaled, and a warning is shown. from the file

HPGL2 import options

Option Description Default
Circle steps The HPGL2 import uses the circle setting of the application, the same as the SVG and the Gerber import. see Gerber preferences
Tools Dia (Milling preferences) When the list has more than one diameter, the new Geometry object gets the first diameter. —

HPGL2 files are read as UTF-8. A byte that is not UTF-8 in a comment is replaced. The geometry is not changed.

PDF

Import Menu entry Creates
PDF Import dialog, entry PDF, or the PDF-Import plugin Gerber and Excellon objects

The PDF import reads the vector artwork of a PDF file, for example a PCB print. Each layer becomes a Gerber object. The drill holes become an Excellon object. The PDF-Import plugin runs the import. See PDF Import.

Option Description Default
Hidden optional content layers A layer that the PDF file hides is skipped. The message shows the number and the names of the skipped layers. skipped
Unsupported content The import lists the PDF content that it cannot read. —
Pages Each page of the PDF file is read. A page that cannot be read is reported with its number. —
pdf_python_parser True uses the built-in Python parser. Set it to False to use the optional pikepdf parser. True
global_tpdf_tmargin, global_tpdf_bmargin, global_tpdf_lmargin, global_tpdf_rmargin Margins of the PDF file that the G-code editor writes when it saves G-code as PDF. The PDF import does not use them. In mm. 15.0, 10.0, 20.0, 20.0

Clipping paths are applied. The clipped artwork is kept, and the parts outside the clip are removed.

Images

Import Menu entry Creates
Image Import dialog, entry Image Geometry or Gerber object

The Image Import plugin converts a raster image to polygons. It works by the black and white mask or by the trace of the outlines. Load the image and set the options in the plugin. See Image Import.

Control Description Default
Load Image Loads and validates the image before the import. —
Object Type Gerber or Geometry: the type of the new object. Gerber
DPI value Resolution of the image, in dots per inch. —
Area Polygons inside the image with less area than this value are discarded (mm or inch). —
Tracing control Presets: Default, Detailed, Smooth or Photo. Options: the controls below. —
Threshold B/W mode only. A pixel darker than this value (0 to 255) is traced. —
Curve Polygon, Spline or Pixel. —
Filter Speckle Patches smaller than this size (in pixels) are discarded. —
Precision and Gradient Step Colors mode only. —
Corner Spline mode only. The minimum angle (degrees) to be a corner. —
Splice Spline mode only. The minimum angle change (degrees) to splice a spline. —
Segment Length Length of the segments. —
Import Image Imports the loaded image as a Gerber or Geometry object. —

Board files

Each board import reads a native board file. The file extension and the file filter select the format.

Format Extension Notes
Altium PCB .PcbDoc A native Altium Designer board.
Proteus PCB .pdsprj A native Proteus project. If the project has more than one board, the boards import one after the other.
KiCad PCB .kicad_pcb A native KiCad board.
Sprint Layout 6 .lay6 A native Sprint Layout 6 board.
Eagle Board .brd A native Eagle board, the XML format of Eagle 6 and later.
OrCAD/Allegro Board .brd A native OrCAD or Allegro board, the binary format.
DipTrace PCB .dip Supported native DipTrace boards, including multilayer designs. Imports saved copper, pads, vias, drilling, outlines, mask, paste and documentation layers. Unsupported records and unavailable artwork are reported during the import.

Eagle and Allegro both use .brd. The program reads the file content to choose the format. An Eagle board is XML. An Allegro board starts with a binary magic number. A file that cannot be read is treated as an Eagle board. A file with another extension is treated as an Altium board.

Each board import opens a file dialog, then a dialog that lets you select the layers and the drills to import. The Proteus PCB entry reads Proteus 8 and Proteus 9 projects.

Each selected layer becomes a Gerber object. The drills become an Excellon object.

Drag and drop

Drop the files on the main window to open them.

  • The window accepts only drops of files. A drop of other data is ignored.
  • The file paths of the drop are passed to the same function as the files on the command line. A project opens first, in the order of the drop. The other files open by their file type.
  • A drop with no local file shows the message Cancelled..

File associations

The program registers these file types for the operating system (Windows and macOS):

Kind Extensions
Gerber art bot bsm cmp crc crs dim g4 gb0 gb1 gb2 gb3 gb5 gb6 gb7 gb8 gb9 gbd gbl gbo gbp gbr gbs gdl gdo ger gko gml gm1 gm2 gm3 gme grb gtl gto gtp gts ly15 ly2 mil outline pho plc pls smb smt sol spb spt ssb sst stc sts top tsm
Excellon drd drl drill exc ncd tap txt xln
G-code cnc din dnc ecs eia fan fgc fnc gc gcd gcode h hnc i min mpf mpr nc ncc ncg ngc ncp out ply rol sbp tap xpi
SVG svg
DXF dxf
PDF pdf
Project FlatPrj (FlatCAM.Project)
Configuration FlatConfig (FlatCAM.Config)

The Gerber, Excellon and G-code lists can be restored or removed in the Preferences. The .FlatPrj and .FlatConfig associations are fixed.

Advanced

  • Opening a file from the command line. A file name on the command line opens at startup. See Command Line and Headless.
  • Missing sources. When a project refers to a source file that is not found, the Missing Source Files dialog lists the files. Click Locate folder... to choose the folder that holds them. See Projects.
  • Import preferences. The Import Preferences from file entry in the File menu loads a preferences file. It does not import geometry.
  • Tcl. The import functions are available in Tcl scripts. See Tcl Command Reference.

See also

Clone this wiki locally