NEW ROOTS DEVELOPMENT
HomeTool GuideVDC UtilitiesDrawing Tools

Clean DWG (one-click cleanup)

The cleanup macro as real commands: duplicates + zero-length erased (native MAPCLEAN-action implementations, Civil 3D objects never candidates), audit with fix-errors on, ACA data purge ( AECCPURGEACANODOBJECTS ), empty text erase , full purge , regapps purge , orphaned-data purge . Super Clean adds the Civil 3D styles purge first (×3 back-to-back) and repeats the full purge until a pass stops removing things .

Command VDCSCANDWG VDCCLEANDWG VDCSUPERCLEAN · VDC Utilities tab › Drawing Tools panel

VDCCLEANDWG is part of Drawing Scan (issue scanner); the full section follows.

The cleanup macro as real commands: duplicates + zero-length erased (native MAPCLEAN-action implementations, Civil 3D objects never candidates), audit with fix-errors on, ACA data purge (AECCPURGEACANODOBJECTS), empty text erase, full purge, regapps purge, orphaned-data purge. Super Clean adds the Civil 3D styles purge first (×3 back-to-back) and repeats the full purge until a pass stops removing things.
The pass pipeline. Boxes with the orange bar are Super Clean only; every pass reports its counts. 0. Civil 3D styles purge PURGESTYLES ×3 back-to-back, parents free up as children purge 1. Duplicates + zero-length exact match, tolerance-based, oldest kept; whitelist: plain linework only, never Civil objects 2. Audit (fix errors: Yes) the real AUDIT command, error/fix counts on the command line 3. ACA data purge AECCPURGEACANODOBJECTS, orphaned toolset data in the NOD 4. Full purge (-PURGE All) purgeables counted before/after, the report shows what it removed 5. Purge again, and again until a pass removes nothing, one nesting level comes off per run 6. Regapps purge registered-app ids from every app that ever touched the file Preview mode (default): every pass counts and lists, palette zooms to each duplicate / zero-length candidate, and NOTHING changes. Apply mode: each pass is its own undo step. Entity passes honor Extents / picked-window scope; audit + purges are drawing-wide by nature. Optional closer (Super Clean, Civil 3D 2027 only): opens the new Geometry Cleanup palette, interactive review of gaps / overshoots / undershoots / misaligned angles. Different defect class, deliberately interactive, connectivity fixes should be reviewed one by one, not auto-applied. Silently skipped on 2026.
Clean DWG pass   Super Clean only   Preview / safety

What the entity passes catch

  • Exact duplicates: same type + layer + text payload (text string / block name) + geometry within tolerance (default 0.001). Reversed lines match. The oldest copy survives.
  • Zero-length curves: length below tolerance, the invisible fragments that break osnaps and selections.
  • Whitelist: lines, arcs, circles, polylines (2D/3D), splines, ellipses, points, text, mtext, plain block inserts. Never: Civil 3D objects, hatches, dimensions, leaders.
  • Locked-layer entities are skipped and counted. Model space only.
  • Exact duplicates only, partially overlapping / collinear geometry is never merged (that is OVERKILL's job, deliberately not chained into a one-click tool).

Guidance

  • Triage with the scanner first: VDCSCANDWG runs every detector read-only, current drawing or a whole folder off disk, grades each file CLEAN / REVIEW / NEEDS CLEANING, names the fixing command, and can hand the flagged files to a Super Clean batch.
  • Preview first on drawings you did not author, then Apply.
  • Style purging is aggressive by design: every unreferenced style goes. If a template's spare styles matter, skip VDCSUPERCLEAN on that file or purge a copy.
  • The purge repeats itself (1.99.0): -PURGE peels one nesting level per pass, so Super Clean runs it until a pass removes nothing. Full-purge passes (default 5) is only a ceiling, and the report distinguishes “nothing more came off” from “ceiling reached”, so the second case is a prompt to raise it, not a shrug. If items keep resurrecting across runs, something is regenerating them; look at what.
  • Empty text objects (1.99.0) are erased before the purge on purpose: they are invisible on screen and on the plot, so nobody has ever deleted them, and each one pins a text style and a layer against the purge. Layouts + model space only, never block definitions, ATTDEFs, or attribute references.
  • Orphaned data (1.99.0) is -PURGE's own option and “All” does not include it; the PURGE dialog ships with its checkbox off, so on a drawing that came from somebody else it has almost certainly never run. It goes LAST, so on a release whose prompt differs the pass reports itself unfinished and nothing else is affected.
  • The ACA data purge (AECCPURGEACANODOBJECTS) deletes only orphaned toolset objects from the Named Objects Dictionary; its purged count prints to the command line. Civil-only, plain AutoCAD seats report it skipped.
  • Draft work product, verify the drawing before saving; U reverses pass-by-pass.
  • Settings %APPDATA%\VDC\CleanDwg\settings.json (env VDC_CLEANDWG_SETTINGS), shared by both commands, schema-tolerant.

Dialog

Drawing Scan (issue scanner) dialog
Drawing Scan (issue scanner), VDCSCANDWG
Drawing Scan (issue scanner) dialog
Drawing Scan (issue scanner), VDCSCANDWG
Clean DWG (one-click cleanup) dialog
Clean DWG (one-click cleanup), VDCCLEANDWG
Clean DWG (one-click cleanup) dialog
Clean DWG (one-click cleanup), VDCCLEANDWG
Clean DWG (one-click cleanup) dialog
Clean DWG (one-click cleanup), VDCCLEANDWG
VDCSUPERCLEAN, No dialog, the full purge preset on the whole drawing, confirmation only.

When to use it

  • Triage a received or legacy project: which drawings are sick, and with what?
  • Before issuing: sweep the deliverable folder for bloat, proxies, and broken xrefs.
  • A drawing is slow or huge and you want to know WHY before running the cleanup.
  • Monthly project hygiene - scan, batch-clean the flagged files, re-scan for the after picture.

How to run it

  1. Run VDCSCANDWG; pick Current drawing or a folder (subfolders optional).
  2. Read the verdicts - every finding names the command that fixes it.
  3. Folder mode: review the CSV in VDC Reports (worst files first).
  4. Optionally check flagged files on the batch-clean checklist - each is backed up, cleaned, saved, closed.
  5. Re-run the scan for the after picture.

Options

  • Scope: current drawing, or every DWG in a folder (side-database, read-only).
  • Detectors: each of the ten toggles independently; all on by default.
  • Batch clean: offer the flagged files to a Super Clean batch after a folder scan.
  • Thresholds: fixed by design - a scan with tunable definitions of 'sick' grades nothing consistently.

Watch out for

  • The scan itself NEVER changes a file - only the optional batch clean writes, and it backs up every file first (the backup is the undo).
  • The ACA data count is the whole population, not just orphans - a little AEC scaffolding is normal and graded as such.
  • A LOCK FILE row means a .dwl sidecar was present - often a stale crash/batch leftover, not a live session. Such rows start unchecked but are safe to check: the batch re-checks every lock at clean time and skips any file genuinely open, naming who.
  • Backup copies (.before-superclean-*) are skipped by design - scan results reflect the live files.
  • UNREADABLE means the file couldn't even be read - open it directly and RECOVER it; the scan can't say more.

Related: Clean DWG · Super Clean · Xref Repath Fixer · QC Status · Standards QC