CAD-Lab brings deterministic, millimeter-precision vector CAD directly into Obsidian—designed for P&ID (Process and Instrumentation Diagrams) and electrical single-line & multi-line schematics. Drawings live as human-readable .cad.md Markdown notes inside your vault with an automatically synchronized Bill of Materials (BOM) table, native AutoCAD R2010 DXF workflows, and true-scale Vector PDF export.
100% Local-First & Offline: Zero runtime dependencies outside Obsidian and standard Web APIs—no telemetry, no cloud servers, and no Node/Electron-only requirements. The exact same plugin bundle runs smoothly on macOS / Windows / Linux and iPadOS (Apple Pencil + touch gestures).



mm): Exact float64 world coordinates, analytic OSNAP (Endpoint, Midpoint, Center, Intersection, Port), Polar Tracking, Ortho, Grid Snap (F9), and zoom-independent precision.ANSI/ISA-5.1, BS 1646, DIN 28004, ISO 10628, ISO 14617), Electrical Single-Line & Multi-Line (IEC 60617, IEC 62271-1 / EN 62271-200, ANSI Y32, NFPA 79), and General (ISO 128), plus custom .cad-library.json creation and .dxf symbol import.Start, End, Both, Middle, Every L/N), and custom dash spacing..dxf files in Obsidian and choose directly from the top badge dropdown (DXF · READ ONLY ▾) whether to Edit DXF directly in place (R2010), Convert to .cad.md (with the option to trash the source .dxf cleanly), or switch back to Read Only..cad.md note embeds a Markdown BOM table (Tag, Symbol, Brand, Model, Standard, Value, Description, Layer, Notes) automatically synced from the canvas (Graphic → Table).A4–A0 / ANSI A–D borders, ISO 7200 / ANSI Y14.1 title blocks, multi-page tabs, search with layer highlighting (FIND), and true-scale multi-page Vector PDF 1.4 output.Pen draws · fingers navigate mode with 1-finger pan, 2-finger pinch-zoom, 2-finger tap Undo, 3-finger tap Redo, configurable Apple Pencil hold-loupe, and floating 123 precision numpad.main.js, manifest.json, and styles.css from the latest GitHub Release.<your-vault>/.obsidian/plugins/cad-lab/.(For development builds into local vaults, npm run deploy compiles production main.js and updates configured vaults while creating automatic backups.)
Click the drafting compass ribbon icon or run CAD-Lab: Create new CAD / P&ID drawing from the Command Palette.
Use the interactive status pill in the top bar at any time:
CAD · EDITABLE ▾: Full editing enabled on .cad.md notes. Click the badge to temporarily lock the view (Switch to Read Only) and prevent accidental edits.CAD · READ ONLY ▾: Safe inspection mode for .cad.md notes. Click the badge and choose Edit CAD drawing to resume editing.DXF · READ ONLY ▾: Source .dxf / binary .dwg safe view. For ASCII .dxf files, click the badge (or banner buttons) to choose Edit DXF directly (saves straight back into the .dxf file in R2010 without creating duplicates) or Convert to .cad.md… (creates a full Markdown CAD note with YAML, BOM & multi-page tabs, optionally trashing the original .dxf).DXF · EDITABLE ▾: Direct R2010 .dxf editing active. Click the badge to Convert to .cad.md… or Switch to Read Only.Most tools accept both toolbar/ribbon clicks and AutoCAD-style keyboard commands (dx,dy, @dx,dy, @length<angle), with customizable keyboard shortcuts (F3 OSNAP, F8 ORTHO, F9 Grid Snap) and mouse button/wheel bindings in Settings.
| Tool | Command / alias | Usage |
|---|---|---|
| Line | LINE, L |
First point, next endpoint; Enter finishes (single or chained) |
| Polyline | PLINE, PL |
Pick vertices; CLOSE closes loop; U undoes last vertex; Enter finishes |
| Intelligent wire | WIRE, W |
Connect block port to port/point with automatic orthogonal rerouting |
| Dimension (mm) | DIM, DIMENSION, D |
First & second extension point (aligned, horizontal, vertical, Ø, R) |
| Circle / Arc / Rectangle | C / A / REC |
Center & radius, center/start/end angle, or opposite corners |
| Text | T |
Insertion point, text content, millimeter height, and rotation |
| Insert symbol | I |
Pick symbol from standard hierarchy, then place on canvas |
| Move / Copy | M / CO |
Grab & drag directly; Copy places at pointer and auto-increments BOM TAG (XV4 → XV5) |
| Rotate / Scale / Mirror | RO / SC / MI |
Rotate around base point, scale uniformly, or mirror across two axis points |
| Match Properties | MA, MATCHPROP |
Pick source object, then apply layer, color, linetype, and styles to targets |
| Offset | O, OFFSET |
Offset inside, outside, or both sides simultaneously with live preview |
| Trim / Extend | TR / EX |
Select cutting boundary line, then click segment to trim or extend |
| Fillet / Join / Bridge | F / J |
Corner fillet between lines, join chains, or toggle individual cross-over bridges |
| Find / Print | FIND / PRINT |
Search objects/BOM tags highlighting Layer, or rescale & print standard sheets |
Every .cad.md note follows a clean, inspectable Markdown layout:
cad-lab: true (drawing scale, units, and component tags are kept clean unless you opt into project preset properties).<!-- cad-bom:start --> and <!-- cad-bom:end -->, CAD-Lab generates a structured BOM table (#, Tag, Component / Symbol, Brand, Model, Standard, Category, Value / Rating, Description, Attributes, Layer, Notes) strictly synchronized from the schematic (Graphic → Table).cad-data Block: Validated millimeter JSON model storing layers, custom linetypes, symbols, multi-page sheets, dimensions, and title blocks.AC1024) with TABLES, BLOCKS, ATTRIB/ATTDEF, DIMENSION, linetypes, and OBSIDIAN_CAD XDATA. Import supports .dxf and ASCII .dwg; binary AutoCAD .dwg containers (AC1009–AC1032) are inspected losslessly to show DWG release metadata, binary sections, and embedded preview thumbnails.If you find CAD-Lab useful for your engineering schematics, P&ID documentation, or field work in Obsidian, you can support ongoing development on Ko-fi:
Written and maintained by Alessandro Abrami (github.com/ide-ale/obsidian-cad-lab).
Released under the GNU Affero General Public License v3.0 (AGPL-3.0).