Format Guide · DWF to JSON API

Parse DWF drawings into structured vector JSON — the cleanest parse path.

DWF (Design Web Format) is Autodesk's structured, read-only vector format — and it is the recommended input for CADLens. Submit a DWF file and receive entity geometry, layer metadata, drawing extents, and a PNG preview. Because DWF does not require a proprietary binary conversion step, it offers the most reliable and fastest parse path in the API.

Join the beta · Free 50/mo →Read the docs
01THE PROBLEM

Published drawings arrive as DWF — not DWG.

In many AEC and manufacturing workflows, the source DWG file stays with the design team. What gets shared externally — with contractors, fabricators, clients, or document management systems — is a DWF export: a compact, read-only delivery format that preserves layers and geometry without exposing the editable source.

If your software receives DWF as the primary input — from a client portal, an email attachment, or an FTP drop — you need to parse the DWF directly. Converting it back to DWG adds complexity and round-trip fidelity risk. CADLens parses DWF natively.

02WHEN TO USE IT

Built for delivery-format workflows.

DWF parsing is the right choice in these scenarios:

  • Construction document management — parse published drawing sets (issued-for-construction DWFs) to extract layer names, entity counts, and drawing extents for a document index.
  • Fabrication intake — accept DWF files from architects and engineers as the authoritative delivery format, extract geometry for pricing or scheduling.
  • Digital archive systems — ingest legacy DWF archives, extract metadata and render PNG thumbnails at scale without installing Autodesk software.
  • Compliance and QA tools — compare layer structure and entity distribution across a set of published drawings programmatically.
03API WORKFLOW

Submit, poll, retrieve.

Authentication is an API key in the Authorization: Bearer header. The base URL is https://api.cadlens.co/v1.

Step 1 — Upload the DWF file:

POST /v1/parse
Content-Type: multipart/form-data
Authorization: Bearer <api_key>

file=<your-drawing.dwf>

// Response
{ "jobId": "job_03pn..." }

For files under roughly 2 MB, pass ?wait=true for a synchronous response. For larger files, the job is queued and you can pass a webhook_url field to receive a callback on completion.

Step 2 — Poll for status:

GET /v1/jobs/job_03pn...
Authorization: Bearer <api_key>

// Response
{
  "jobId": "job_03pn...",
  "status": "COMPLETED",   // PENDING | PROCESSING | COMPLETED | FAILED
  "fileName": "site-plan.dwf",
  "fileSize": 192000,
  "createdAt": "2024-10-14T14:00:00Z",
  "completedAt": "2024-10-14T14:00:05Z"
}

Step 3 — Retrieve the result and preview:

GET /v1/jobs/job_03pn.../result   // vector JSON
GET /v1/jobs/job_03pn.../image    // signed PNG URL
04EXAMPLE OUTPUT

What a DWF parse returns.

The result schema is versioned at 2024-01. A typical DWF result for a published site plan:

{
  "jobId": "job_03pn...",
  "status": "COMPLETED",
  "metadata": {
    "units": "m",
    "boundingBox": { "width": 120, "height": 80 }
  },
  "layersJson": [
    { "name": "SITE-BOUNDARY", "colorHex": "#ffffff", "entityCount": 1  },
    { "name": "BUILDINGS",     "colorHex": "#808080", "entityCount": 24 },
    { "name": "ROADS",         "colorHex": "#ffcc00", "entityCount": 38 },
    { "name": "ANNOTATIONS",   "colorHex": "#00ff00", "entityCount": 61 }
  ],
  "vectorJson": [
    {
      "type": "POLYLINE",
      "layer": "SITE-BOUNDARY",
      "closed": true,
      "vertices": [
        { "x": 0,   "y": 0  },
        { "x": 120, "y": 0  },
        { "x": 120, "y": 80 },
        { "x": 0,   "y": 80 }
      ]
    }
  ],
  "imageUrl": "https://cdn.cadlens.co/results/job_03pn.../preview.png?..."
}
05LIMITATIONS

Fair-use and known constraints.

  • DWFx (beta): the DWFx variant (Open Packaging Convention format) is supported in beta. Use standard DWF for production workloads.
  • File size: approximately 10 MB per file on standard plans.
  • Entity count: up to approximately 50,000 entities per drawing.
  • Processing time: up to 30 seconds on standard plans; DWF files are typically among the fastest to process.
  • Multi-sheet DWF: when a DWF contains multiple sheets, CADLens currently parses the first model-space sheet. Multi-sheet support is on the roadmap.
  • Embedded raster content: raster images embedded in a DWF are not extracted; only vector entities are returned.
06 — FAQ

Common questions.

DWF (Design Web Format) is a compact, read-only vector format developed by Autodesk for sharing and publishing design data. It preserves layer structure, geometry, and metadata without exposing editable source geometry, making it common in construction, manufacturing, and document workflows.

DWF is a structured, well-defined format that does not require a proprietary binary conversion step. The parser works directly from the format specification, which means fewer edge-case failures and faster processing compared to DWG.

Standard DWF files are supported in stable production mode. DWFx (the Open Packaging Convention variant) is currently in beta. Submit standard DWF for production workloads.

Yes. DWF preserves the original layer structure from the source drawing. The layersJson array in the result contains each layer name, its color, and the count of entities on that layer.

If you already have the DWG and your workflow allows it, DXF export may be the most direct path. DWF is the best choice when the original source file is not available — for example, when receiving deliverables from a contractor or architect who provides DWF as the official published format.

No. Only successful parses count toward your monthly quota. A job that ends in FAILED status is never billed.

JOIN THE BETA

Get an API key. Parse your first drawing today.

Free tier includes 50 parse requests per month. No credit card required.

Join the beta · Free 50/mo Read the docs
— RELATED

Keep reading.