pcb_export_to_file
Export PCB designs in formats such as Gerber, ODB++, 3D STEP, or PDF directly to a local file path, avoiding large Base64 payloads in the MCP response.
Instructions
Export the PCB design in various formats directly to a local file path — preferred over pcb_export when the output is large (gerber/odbplus zips, 3d STEP, pdf), since it avoids shipping the bytes back through the MCP response as Base64.
BEFORE generating any fabrication output: run pcb_run_drc (and sch_run_drc) and resolve all violations. Clearance DRC alone is not sufficient — include connectivity/No-Connection checks; see pcb_export for why.
Returns { saved: path, size, originalName, format }.
Formats: same as pcb_export. See pcb_export for option shapes.
Most formats accept extra options forwarded as-is to the underlying EasyEDA getXxxFile call. Common ones (unit values are the literal strings "mm" / "inch" / "mil"):
gerber: { unit: "mm" | "inch", colorSilkscreen, digitalFormat: {integerNumber, decimalNumber}, other: {metallicDrillingInformation, nonMetallicDrillingInformation, drillTable, flyingProbeTestingFile}, layers: [{layerId, isMirror}], objects: [...] }
odbplus: { unit: "inch", otherData: {metallizedDrilledHoles, nonMetallizedDrilledHoles, drillTable, flyingProbeTestFile}, layers: [{layerId, mirror}], objects: [{objectName}] }
pick_and_place:{ unit: "mm" | "mil" }
3d: { element: [...], modelMode: "Outfit" | "Parts", autoGenerateModels }
bom: { template, filterOptions, statistics, property, columns }
dxf: { layers: [{layerId, mirror}], objects: [...] }
Omit options to get sensible defaults. For gerber and odbplus, omitting layers exports
all enabled copper (Top, Bottom, and any Inner1..InnerN that are enabled) plus the standard
silk/mask/paste/outline aux layers — unlike EasyEDA's raw default which silently drops inner
copper even on 4L+ boards.
CAUTION: options keys cannot override the top-level document/instance_id routing fields — those always take precedence to prevent accidental cross-document export.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | Yes | Export format | |
| options | No | Format-specific options passed through to the underlying EasyEDA call. | |
| document | Yes | Target document UUID — auto-switches to this document before executing. Get UUIDs from list_instances or editor_get_open_tabs. | |
| filePath | Yes | Absolute path to write the exported file to | |
| fileType | No | Sub-format (e.g. "xlsx"/"csv" for bom, "step"/"obj" for 3d) | |
| instance_id | No | Target EasyEDA instance ID (8-char hex). Required when multiple instances are connected. Omit when only one instance is connected (auto-selected). Use list_instances to see connected instances. |