Open files in VS Code and Cursor / 3D and imaging
Measure a distance in a DXF drawing in VS Code
DXF Viewer & File Preview for 2D CAD Drawings opens .dxf files in VS Code with no CAD program. Press M (or click Measure) and click two points. The bar under the drawing shows the distance in the drawing units, ΔX, ΔY and the angle, and points snap to ends, centres and vertices. Copy puts that line on the clipboard. Measuring is free, like the rest of the viewer. Zovo Pro (USD 19 once) adds three tools for many drawings or revisions, such as Compare drawings, with 3 free tries each.
Free, MIT license. Extension ID zovo.dxf-viewer, version 0.3.2. Needs VS Code 1.90.0 or newer.
Also free from Zovo: STL Viewer, OBJ, GLB & glTF Preview, VS Code Marketplace · Open VSX (Cursor, Windsurf).

Steps in VS Code
- Install DXF Viewer from the Marketplace, or press Ctrl+P (Cmd+P on macOS) and run
ext install zovo.dxf-viewer. - Click a
.dxffile in the Explorer. ASCII and binary DXF from R12 to AutoCAD 2018 open. The Drawing panel on the left shows the units stored in the file, such as mm, or "not set". - If the drawing has sheets, pick Model in the Sheet list first. On a sheet the viewports are scaled, so you would measure the sheet and not the real size.
- Press M or click Measure in the top bar. Zoom in with the scroll wheel, then move the mouse near a line end, a centre or a vertex. A small square shows the point it snaps to. Click the first point, then the second.
- Read the bar under the drawing. It shows Distance, ΔX, ΔY and Angle, in the units of the file. Click Copy to put that line on the clipboard for a ticket or a chat.
- A third click starts a new measurement. Press Esc, or M again, to stop measuring.
Where Zovo Pro saves time
Opening DXF files, sheets, layers, find text, measure, live reload and PNG or SVG export are free and stay free.
When a new revision of the drawing arrives and you want to know what moved, Compare drawings reads two .dxf files and opens a report. It lists the layers and block counts that changed, and each entity that was added, removed or changed, with the old and new values, such as a moved door, edited text or an attribute that went from REV A to REV B. The other two Pro tools are Extract drawing data (block attributes, block counts, text or layers to CSV) and Folder inventory (one CSV row per drawing with version, units, size, layers and title block fields).
With Compare drawings (Zovo Pro)
- Open the older revision. Pick "Compare Two Drawings (Zovo Pro)" from the
...menu of the drawing, or run "DXF Viewer: Compare Two Drawings (Zovo Pro)" from the Command Palette. - Pick the newer revision in the file dialog.
- Read the report that opens. A try counts only when the report opened, so Cancel or Escape costs nothing.
Compare drawings works 3 times on your computer before it asks for a license, and a try counts only when you get a result. Opening a file shows no popup and no countdown.
Zovo Pro costs USD 19 once. It is not a subscription, and it turns on the Pro tools in every Zovo extension, not only DXF Viewer. After a card payment (Stripe) your license key shows on the next page. In VS Code, run "Zovo Pro: Enter Zovo Pro license key" from the Command Palette and paste it. The key is checked on your computer, with no network call. With GitHub Sponsors, pick the "$19 one time" tier, then run "Zovo Pro: I already paid: unlock with GitHub Sponsors" and sign in with the same GitHub account. With PayPal, send USD 19 with "Zovo Pro" in the note and the key comes by email within a day.
A team of 5: USD 59 once, by card or by PayPal. Every rule and every Pro tool is on the Zovo Pro page.
Steps in Cursor, Windsurf or VSCodium
- Open the Extensions view with Ctrl+Shift+X (Cmd+Shift+X on macOS).
- Search for
zovo.dxf-viewerand click Install. Cursor, Windsurf and VSCodium install from Open VSX, where it is published aszovo/dxf-viewer. - If your editor has no gallery, download the .vsix from the Open VSX page and run "Extensions: Install from VSIX...".
- Then use it the same way as in VS Code.
What DXF Viewer handles
- ASCII and binary DXF, from R12 to AutoCAD 2018, with blocks, nested inserts, text and dimensions.
- Snapping to ends, centres and vertices while you measure.
- The units stored in the file (mm, cm, m, in, ft and others), shown in the Drawing panel and after the distance.
- Paper space sheets with their viewports, layers you can hide, and find text.
What it does not do
- 3D entities are drawn flat, as a top view, and a measurement has only ΔX and ΔY. 3DSOLID, REGION and BODY are not drawn.
- Viewports are drawn as rectangles. A viewport clipped to a polygon shows its rectangular frame.
- DWG files are not supported. Save a DXF copy from your CAD program, or convert a folder with the free ODA File Converter.
- Files over 500 MB are not read (setting
dxfViewer.maxFileMB, up to 2048).
Other options
- LibreCAD. A free, open source 2D CAD program for Windows, macOS and Linux that opens DXF files and measures distances. A separate desktop install.
- QCAD. A 2D CAD program for Windows, macOS and Linux with a free community edition. It opens DXF files and has measuring tools.
Install counts and Open VSX status were checked on 12 November 2026. Descriptions in quotes are the extensions' own.
Questions
What units is the distance in?
In the drawing units stored in the file, such as mm or in. The Drawing panel shows them. When the file sets no units, the bar says units, and you need to know the scale the drawing was made in.
Can I measure an area?
No. Measure gives the distance between two points, with ΔX, ΔY and the angle. It has no area or perimeter tool.
Does measuring change the file?
No. DXF Viewer never changes the drawing. The only files it writes are exports you pick in the save dialog, and it refuses to write over a drawing.
Does it work in Cursor or Windsurf?
Yes. Cursor, Windsurf and VSCodium install extensions from Open VSX. Search for the extension in their Extensions view and install it there.
More about DXF Viewer
Read the DXF Viewer page for every feature and setting, or the source code on GitHub.
Related guides
- STL Viewer, OBJ, GLB & glTF Preview on the VS Code Marketplace (also on Open VSX). Opens STL, OBJ, PLY, GLB and glTF models in VS Code, beside the code.
- DXF to CSV in VS Code
- View STL files in VS Code
- Open DICOM and NIfTI files in VS Code
- Calculate the volume of an STL file
Support this work
If this extension saves you time, you can support the work on GitHub Sponsors. Monthly tiers start at $5, and one-time tiers start at $15. Sponsorship is optional, and the tool works the same without it.
Need your format supported?
Open a format request with a sample file, and I reply there whether it can be done. For USD 299 once, through this GitHub Sponsors tier, I add your file format or a missing feature to this extension, with tests, within 7 days.