npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@willsunagency/cadguide-dwg-version

v1.0.0

Published

Zero-dependency AutoCAD DWG binary magic bytes inspector and version identification matrix (AC1009 to AC1032), maintained by CADGuide.tools.

Readme

@willsunagency/cadguide-dwg-version

npm version License: MIT

Lightweight, zero-dependency AutoCAD DWG binary header inspector and version identification matrix (AC1009 to AC1032). Maintained by CADGuide.tools Engineering.


🎯 Background & Engineering Context

Native AutoCAD drawing files (.dwg) are binary vector files structured around an internal object-oriented database. Unlike open text formats such as DXF or SVG, DWG files store a strict 6-byte ASCII identification code at the very beginning of the file stream (0x00 through 0x05).

When opening legacy drawings or receiving vendor files that trigger fatal errors or "Drawing file is not valid" warnings, inspecting these first 6 magic bytes allows instant version identification without requiring heavy desktop CAD installations.

For an interactive, client-side web inspector that runs entirely in your browser without uploading proprietary geometry to external servers, explore the CADGuide DWG Version Checker.


📦 Installation

npm install cadguide-dwg-version

Or using Yarn / pnpm:

pnpm add cadguide-dwg-version

🚀 Quick Usage

Node.js (Reading from File System)

const fs = require('fs');
const { inspectDwgHeader } = require('cadguide-dwg-version');

// Read first 6 bytes from a native DWG file
const buffer = Buffer.alloc(6);
const fd = fs.openSync('assembly_drawing.dwg', 'r');
fs.readSync(fd, buffer, 0, 6, 0);
fs.closeSync(fd);

const result = inspectDwgHeader(buffer);
console.log(result);
/* Output:
{
  isValidDWG: true,
  signature: 'AC1032',
  metadata: {
    release: 'AutoCAD 2018–2026',
    year: 2018,
    dwgVersion: 'AC1032',
    supported: true
  },
  error: null
}
*/

Browser / WebAssembly / Client-Side File API

import { inspectDwgHeader } from 'cadguide-dwg-version';

async function handleFileUpload(file) {
  // Read first 6 bytes via ArrayBuffer slice
  const slice = await file.slice(0, 6).arrayBuffer();
  const inspection = inspectDwgHeader(slice);

  if (inspection.isValidDWG) {
    console.log(`Detected: ${inspection.metadata.release} (${inspection.signature})`);
  } else {
    console.error(`Invalid DWG signature: ${inspection.error}`);
  }
}

📊 Complete AutoCAD DWG Magic Bytes Matrix

| Byte Signature | Marketing Name & Release Version | Year of Introduction | OpenDWG / LibGDX Support | | :--- | :--- | :--- | :--- | | AC1032 | AutoCAD 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026 | 2018 | Full Support | | AC1027 | AutoCAD 2013, 2014, 2015, 2016, 2017 | 2013 | Full Support | | AC1024 | AutoCAD 2010, 2011, 2012 | 2010 | Full Support | | AC1021 | AutoCAD 2007, 2008, 2009 | 2007 | Full Support | | AC1018 | AutoCAD 2004, 2005, 2006 | 2004 | Full Support | | AC1015 | AutoCAD 2000, 2000i, 2002 | 2000 | Full Support | | AC1014 | AutoCAD Release 14 (LT97 / LT98) | 1997 | Legacy | | AC1012 | AutoCAD Release 13 (LT95) | 1994 | Legacy | | AC1009 | AutoCAD Release 11 / 12 (LT R1 / R2) | 1990 | Legacy | | AC1006 | AutoCAD Release 10 | 1988 | Obsolete | | AC1004 | AutoCAD Release 9 | 1987 | Obsolete | | AC1002 | AutoCAD Release 2.5 | 1986 | Obsolete | | MC0.0 | AutoCAD Release 1.0 (MicroCAD) | 1982 | Historical |


🛠️ Related Engineering Calculators & Resources


📄 License

MIT © CADGuide.tools Engineering