RealDWG-Web: Bringing AutoCAD File Power to the Web
For decades, AutoCAD has been the cornerstone of 2D drafting and design. And at the heart of this ecosystem is the DWG and DXF file format…
RealDWG-Web: Bringing AutoCAD File Power to the Web

RealDWG-Web
For decades, AutoCAD has been the cornerstone of 2D drafting and design. And at the heart of this ecosystem is the DWG and DXF file format — binary and text formats that carry the geometric DNA of millions of engineering and architectural designs worldwide.
Autodesk’s RealDWG SDK gave desktop developers the power to read, write, and create DWG/DXF files without launching AutoCAD. But what if we could do all that — in the browser?
Meet RealDWG-Web (Gitlab or Github): an ambitious project to bring AutoCAD-compatible file reading (and eventually writing) capabilities to the web using WebAssembly, modular architecture, and familiar APIs for ObjectARX developers.
What Is RealDWG-Web?
At its core, RealDWG-Web is a browser-native SDK that mirrors the capabilities of Autodesk’s RealDWG — but built for web applications.
- Current capability: Read DWG and DXF files directly in the browser.
- Future roadmap: Support writing DWG/DXF files, allowing full read/write/edit workflows in pure web environments.
This project offers APIs that feel familiar to AutoCAD’s ObjectARX, making it easy for seasoned CAD developers to jump into a web-native workflow without learning everything from scratch.
App Based on RealDWG-Web
[embed]DWG Viewer for Google Drive
Modular Converter System
RealDWG-Web introduces a converter registration mechanism that allows you to plug in support for different file types (DWG, DXF, and potentially more in the future) at runtime.
Register a DWG Converter
import { AcDbDatabaseConverterManager, AcDbFileType } from '@mlightcad/data-model';
import { AcDbLibreDwgConverter } from '@mlightcad/libredwg-converter';
import('@mlightcad/libredwg-web/wasm/libredwg-web').then(libredwgModule => {
const dwgConverter = new AcDbLibreDwgConverter(libredwgModule);
AcDbDatabaseConverterManager.instance.register(AcDbFileType.DWG, dwgConverter);
});
Unregister a Converter
AcDbDatabaseConverterManager.instance.unregister(AcDbFileType.DWG);
Get a Converter
const converter = AcDbDatabaseConverterManager.instance.get(AcDbFileType.DXF);
This flexible mechanism makes the system extensible and plugin-friendly, allowing developers to:
- Support new file formats
- Replace or remove converters at runtime
- Listen to converter lifecycle events
Architecture: Built for CAD Developers
AutoCAD’s ObjectARX SDK has been the backbone of countless CAD add-ons, tools, and vertical applications. RealDWG-Web embraces this legacy by mimicking its modular structure.
Here’s a breakdown of its key components:
geometry-engine: The Math & Geometry Core
This module handles everything about geometric entities and transformations.
- Math Layer: Vector, matrix, and transform classes — adapted from
THREE.jsfor high-performance math operations. - Geometry Layer: Points, curves, lines, surfaces, and more.
Key Classes:
AcGePoint2d/AcGePoint3dAcGeVector2d/AcGeVector3dAcGeMatrix3dAcGeLine3d,AcGeCurve2d,- ...
data-model: AutoCAD’s Entity Structure
This is the heart of the CAD data system, replicating AutoCAD’s drawing database structure.
It defines familiar ObjectARX-style classes and makes it seamless to:
- Define and manipulate entities (like lines, circles, blocks)
- Handle attributes and geometry
- Read/write to a drawing database
Key Classes:
AcDbObjectAcDbEntityAcDbPolylineAcDbBlockReference- …
graphic-interface: Custom Rendering
While not 100% ObjectARX-aligned (on purpose), this module offers a simplified rendering layer to draw entities on the screen — perfect for web visualization.
Key Classes:
AcGiEntity: Drawable base classAcGiRenderer: Renders entities to graphics buffers- …
This divergence from ObjectARX is intentional — because AcGi’s complexity isn’t always necessary in a web environment. The goal here is pragmatic rendering, not strict fidelity.
DWG Converters: Choose Your Weapon
RealDWG-Web already supports multiple DWG parsing engines via WebAssembly:
libdxfrw-converter
- Powered by
libdxfrw(open-source DWG/DXF library) - Compiled to WebAssembly
- Lightweight and open
libredwg-converter
- Based on GNU’s
LibreDWGlibrary - Also WebAssembly-powered
- Flexible alternative with broader format support
These converters plug right into the AcDbDatabaseConverterManager—you can use one or both depending on your licensing, performance, and compatibility needs.
Why RealDWG-Web Matters
- Web-native DWG Support: No AutoCAD installation. No desktop SDKs. No COM. Just browser-based drawing access.
- Familiar APIs: Built with ObjectARX-style structure so experienced CAD devs can reuse their knowledge.
- Extensible Design: Pluggable converters and modular architecture open the door to 3D CAD, hybrid formats, or cloud workflows.
- Open to Innovation: Combine it with collaborative tools, cloud storage, or even AI-based drawing assistants — because the web is the new frontier.
What’s Next?
The current version of RealDWG-Web API supports both reading and writing. However, it doesn’t support writing changes to DXF/DWG yet. Our roadmap includes:
- Writing DWG/DXF files
- Sketching and editing UI
- Cloud-based multi-user collaboration
- …
Try It Out
Start by exploring the API documentation, or clone the repo and register your favorite converter.
Want to build the next browser-based CAD editor? RealDWG-Web is a great place to start.
Final Thoughts
RealDWG-Web is more than a port — it’s a rethinking of CAD file interaction for the browser age. With a clean API, WebAssembly speed, and deep respect for AutoCAD’s heritage, it’s poised to become a foundation for the next generation of CAD tools — cloud-first, API-friendly, and lightning-fast.
If you’re a CAD developer curious about web tech — or a web developer fascinated by CAD — this project is worth watching. And contributing to.
메타데이터
- post_id
- efd2395b9902
- slug
- realdwg-web-bringing-autocad-file-power-to-the-web-efd2395b9902
- url
- https://medium.com/@mlightcad/realdwg-web-bringing-autocad-file-power-to-the-web-efd2395b9902
- canonical_url
- https://medium.com/@mlightcad/realdwg-web-bringing-autocad-file-power-to-the-web-efd2395b9902
- author_url
- https://medium.com/@mlightcad
- status
- ok
- fetched_at
- 2026-06-10 22:22:12