Open SolidCraft above to try it in your browser, or download it for your desktop. This page covers one specific command: exporting whatever the Design viewport currently shows as a flat 2D DXF drawing. Everything below comes from SolidCraft's official documentation (version v0.23.1, released 26 October 2026), linked at the bottom. If you are looking for the DXF that comes out of a folded sheet-metal part instead, see SolidCraft Sheet Metal, which has its own, unrelated flat-pattern export.
Two different DXF exports, one name
SolidCraft ships two commands that both end in a .dxf file, and it is easy to confuse them:
| Export | Command | What it captures |
|---|---|---|
| View DXF (this page) | File → Export Current View as DXF… | A 2D projection of the current camera view: visible bodies, sketches and hidden-line edges |
| Flat pattern DXF | Sheet Metal → Create Flat Pattern → export | The unfolded flat shape of a sheet-metal part, with bend lines and layers for CAM/nesting |
If you need a laser-cutting pattern for a bent bracket, use the sheet-metal one. If you need a quick 2D line drawing of a part or sketch from whatever angle you are looking at, this is it.
Run the export
Choose File → Export Current View as DXF… (Japanese menu: ファイル → 現在の表示をDXFでエクスポート…). The dialog has two settings, both remembered between uses:
- Hidden edges: omit them, or export them as dashed lines.
- Curve tolerance: 0.0001–1 mm, default 0.01 mm. Smaller values draw curves more precisely but take longer and use more memory, since every arc, circle and spline is converted to straight chord segments at this tolerance — there is no exact curve export.
Click Export DXF… and pick a destination. On desktop, the job runs on a background worker (mesh preparation, surface preparation, projection, hidden-line removal, writing) while the window stays responsive, and Cancel stops it at the next checkpoint. The browser build runs the same export synchronously on its single thread. Either way, the file is written atomically: a cancel before the final write keeps whatever file was there before, and once the atomic write starts, it always finishes.
What the camera decides
The export uses the camera exactly as it was when you clicked Export, including roll and the world's up axis:
- Orthographic views keep 1:1 dimensions in the view plane — the closest thing SolidCraft has to a to-scale 2D drawing today.
- Perspective views keep foreshortening, projected onto the plane through the camera target. These are meant as illustrations, not dimensioned fabrication drawings.
Only shown bodies at their current placement are exported; hidden bodies neither draw nor hide anything else. The full projected geometry comes out, including parts that fall outside the current viewport frame. Grid, dimensions, constraints, selection highlights and other on-screen overlays are never included, and section analysis should be turned off before exporting. If a model crosses the perspective camera's eye plane, zoom out first — SolidCraft fails complex or out-of-range exports with an error rather than writing a partial, incomplete drawing.
Sketches export too
A design with nothing but a sketch — no solid body at all — can still be exported. Only profile curves come out: drawn 2D curves, drawn 3D-sketch curves and text outlines. Construction geometry, centerlines, projected references and points are left out. Sketch curves land on their own SKETCH layer, each one as a single LINE or LWPOLYLINE (arcs, circles and splines are flattened to straight segments at the tolerance you set). A finished sketch is treated like a body edge — hidden behind geometry in front of it, dashed on the HIDDEN layer if you asked for hidden edges — while the sketch currently being edited draws on top, matching what you see in the viewport.
Layers and entity types
The output is an AutoCAD 2000 ASCII DXF, in millimetres, flattened to Z = 0:
| Layer | Contents |
|---|---|
VISIBLE |
Continuous-linetype visible edges |
SKETCH |
Shown sketch curves (only when a sketch is visible) |
HIDDEN |
Dashed hidden edges (2 mm dash / 1 mm gap), only when requested |
Hidden curves are written as connected LWPOLYLINE entities with continuous linetype generation, so the dash pattern flows across the whole line instead of restarting at every chord — the polyline flags follow the official Autodesk DXF reference. Edges get split wherever another surface occludes them, including partial occlusion from a different body; triangle diagonals and smooth mesh seams are excluded, but curved-body silhouettes are kept. Repeated component placements (the same part used several times in an assembly) share one export mesh and triangle hierarchy, while each placement still keeps its own edge visibility, position and orientation — nothing is fused or dropped to save work.
Scripting it with file.export_view_dxf
The same export is available as a control-protocol command, so it can be driven from a script or an AI agent via the SolidCraft CLI or SolidCraft MCP:
{"command": "file.export_view_dxf", "params": {
"camera": {"...": "..."},
"hidden": "dashed",
"tolerance": 0.01,
"path": "view.dxf"
}}
camera is required; hidden is "omit" or "dashed"; tolerance is optional (0.0001–1 mm). If you leave out path, the command returns the DXF text instead of writing a file, and it never touches the design or its undo history. The response also carries stats — placed-body and shared-mesh counts, source triangle count, retained mesh bytes, the worker limit, candidate and output segment counts, total occlusion work, and preparation/projection/occlusion timings in milliseconds (STEP import and DXF text serialization are excluded from those timings).
Performance limits worth knowing
Desktop mesh preparation and line-visibility queries use up to eight computation workers at once; the browser build runs everything on one thread. Export memory, candidate lines, output lines and total occlusion work are all bounded — exceeding the budget returns an error rather than a silently incomplete drawing. For a part this size catches, dropping the curve tolerance back toward 1 mm or hiding bodies you do not need in the view is the first thing to try.
What this export is not
It is not a dimensioned engineering drawing: there is no annotation, tolerancing, title block or multi-view sheet layout here — SolidCraft's dedicated Drawing workspace is still an unreleased, in-progress feature in the project's roadmap, separate from this command. It is also not the Sheet Metal flat-pattern export covered on the SolidCraft Sheet Metal page, and it does not replace STEP when you need a true 3D file for another CAD system. Treat it as a fast way to turn the current camera view, sketch or part into a clean 2D line file for a drawing template, a laser reference or a quick illustration.