How to Fix 'Drawing File Is Currently in Use / Locked' (.DWL & .DWL2) After a Crash
Safely unlock network DWG files stuck in Read-Only mode after a workstation crash or VPN drop by inspecting and removing orphaned .dwl, .dwl2, and SMB file handles.
Verify via WHOHAS that no colleague actually has the drawing open, close GstarCAD on the crashed workstation, navigate to the project folder in Windows Explorer (with 'Hidden items' enabled), and delete the orphaned 1-KB .dwl and .dwl2 lock files sharing the drawing's name.
1. Root Cause & DWG Database Symptom Analysis
When a workstation opens Plan-A101.dwg on a shared SMB network drive or NAS, GstarCAD and AutoCAD automatically create two tiny hidden lock files in the same directory: Plan-A101.dwl (plain text) and Plan-A101.dwl2 (XML) containing the username, computer hostname, and timestamp. If that PC loses power or drops VPN, those lock files remain behind and force the drawing into Read-Only mode.
2. Step-by-Step Resolution in GstarCAD & AutoCAD
Step 1: Inspect Who Holds the Lock (.DWL / WHOHAS)
Enable View → Show → Hidden items in Windows File Explorer and open DrawingName.dwl in Notepad (or run WHOHAS in CAD). It displays the exact Windows username, workstation ID, and time the file was opened.
Step 2: Delete Orphaned .DWL and .DWL2 Files After Confirming Crash
Once you confirm with the colleague that their CAD session closed, select both DrawingName.dwl and DrawingName.dwl2 in Windows Explorer and press Delete.
Step 3: Clear Stuck Windows Server SMB File Handles (fsmgmt.msc)
If the `.dwl` files are gone but Windows Server still says "The action can't be completed because the file is open in another program", a dead SMB network socket is hanging on the server. Have your IT admin open Shared Folders (`fsmgmt.msc` → Open Files) on the file server, right-click the stuck `.dwg` handle, and click Close Open File.
3. System Variables & Command Diagnostic Table
| Variable / Command | Default / Target Value | Diagnostic Function & Fix Behavior |
|---|---|---|
.dwl / .dwl2 Files |
Hidden Lock Sidecars | Created on DWG open; deleted automatically on normal close |
WHOHAS |
Ownership Query | Displays username and PC name currently editing the DWG |
fsmgmt.msc -> Open Files |
Windows Server Admin | Releases ghost SMB network locks after a client VPN drop |
.bak / .sv$ Files |
Crash Recovery Backups | Rename .bak or DRAWRECOVERY .sv$ to .dwg if the crash corrupted the save |
4. One-Click AutoLISP Fix Script (AutoLISP Active Drawing Lock (.DWL) WhoHas Inspector)
(defun c:CHECK-DWL-OWNER ( / dwlPath fp line)
(setq dwlPath (strcat (getvar "DWGPREFIX") (vl-filename-base (getvar "DWGNAME")) ".dwl"))
(if (findfile dwlPath)
(progn
(setq fp (open dwlPath "r"))
(princ "\n=== Active .DWL Lock File Info ===")
(while (setq line (read-line fp)) (princ (strcat "\n " line)))
(close fp))
(princ "\n[Lock Info] No .dwl file found in current directory."))
(princ)
)
Enterprise AC1032 Database Internals & Cross-Version Diagnostics
In multi-office engineering environments operating across GstarCAD 2027, GstarCAD Mechanical, GstarCAD Architecture, and legacy AutoCAD (2018–2027) seats, mastering How to Fix 'Drawing File Is Currently in Use / Locked' (.DWL & .DWL2) After a Crash requires understanding how the underlying AC1032 DWG binary database serializes entity handles, symbol table records, and Named Object Dictionary (NOD) pointers.
1. DWG Header & Registry Persistence Scope
Variables and object properties fall into three persistence scopes: Drawing-Saved (DXF Header) variables that travel with the .dwg file to subcontractors, Registry-Saved (Profile .arg) settings that persist per Windows workstation user, and Session-Volatile states that reset on every launch unless locked inside acaddoc.lsp. Always verify persistence scope via SYSVDLG before issuing sheets to an ISO 19650 Common Data Environment (CDE).
2. Multi-Core Regeneration & Memory Hygiene
When processing large civil corridors, dense plant P&IDs, or 50-sheet architectural Xref trees, unpurged Registered Application IDs (REGAPP), orphaned DGN stroke dictionaries, and redundant annotation scales degrade spatial index (INDEXCTL = 3) lookup speed. Executing a pre-submittal AUDIT, command-line -PURGE → Regapps, and OVERKILL pass keeps file open times under 2 seconds on GstarCAD's multi-threaded graphics kernel.
3. Hybrid AutoCAD + GstarCAD Team Coexistence
Because GstarCAD reads and writes native AC1032 binary records without intermediate import/export translation, dynamic block grips, associative hatches, XData payloads (DXF groups 1000–1071), Paper Space viewport layer overrides (VPLAYER), and X.509 digital signatures round-trip losslessly between AutoCAD and GstarCAD seats on shared SMB/BIM cloud folders.
Production Field Verification Protocol (ISO 9001 / ISO 19650 Gate)
- Baseline Template Audit: Confirm that the active drawing inherits layer naming, linetype scales (
PSLTSCALE = 1,MSLTSCALE = 1,LTSCALE = 1.0), and dimension styles from the enterprise.dwt/.dwsstandards file viaCHECKSTANDARDS. - Coordinate & Unit Integrity: Run
-DWGUNITSor checkINSUNITS,LUNITS, andMEASUREMENTto guarantee 1:1 metric (`mm`/`m`) or imperial (`in`/`ft`) block and Xref insertion scaling, withOSNAPZ = 1preventing unintended 3D elevation drift. - Submittal Packaging & Mobile Review: Lock all Paper Space viewports (`DisplayLocked = Yes`), bind or relative-path all external references via
ETRANSMIT, and verify final plotted PDF/A lineweights (`ISO full bleed`) alongside DWG FastView mobile cloud markup links.
Related Engineering Guides, Courses & Troubleshooting FAQs
Continue building your CAD engineering mastery with these related GstarCAD Academy technical references:
- [Engineering Guide] Course 26: Stepped Shaft Generator (AMSHAFT), Rolling Bearings, Gears & Keyway Automation
- [Engineering Guide] Course 30: Compression/Extension/Torsion Spring & Cam Profile Generators in GstarCAD Mechanical
- [Engineering Guide] Course 36: Raster-to-Vector Blueprint Conversion, TIFF Georeferencing & Two-Point ALIGN
- [Troubleshooting FAQ] How to Fix FILEDIA: Open, Save & Plot File Dialog Box Missing (Showing Command Prompt)
- [Troubleshooting FAQ] How to Fix PICKFIRST: Pre-Selected Objects Dropped and DELETE Key Not Working in CAD
- [Troubleshooting FAQ] How to Fix WIPEOUT Frames Showing on Screen or Plotting Solid Black Boxes in PDF
- [Skill Certification] Test Your Mastery on the 850-Question GstarCAD Engineering Certification Engine →
Need 100% Native DWG Compatibility Without Subscription Lock-In?
Engineered by Suzhou Gstarsoft Co., Ltd. (SSE: 688657), GstarCAD 2027 opens, repairs, and plots AC1032 DWG files with full command and AutoLISP parity.