How to Lock Layout Viewport Scale & Freeze Layers in One Viewport Only (VPLAYER)
Prevent accidental mouse-wheel zoom changes in Paper Space layouts and isolate discipline layers per viewport using Display Locked and VP Freeze in GstarCAD 2027 and AutoCAD.
⚡ Quick Executive Fix
Select the viewport border, set 'Display Locked = Yes' in Properties (or right-click > Display Locked > Yes), and use the Layer Manager's 'VP Freeze' column (or VPLAYER) to hide layers inside the active viewport without affecting Model Space.
1. Engineering Root-Cause Diagnosis inside the AC1032 DWG Database
Two classic sheet-production mistakes plague multi-discipline DWG deliverables: (1) an engineer double-clicks inside an unlocked `1:100` Paper Space viewport, rolls the mouse wheel to inspect a detail, and accidentally ruins the sheet's calibrated plot scale; and (2) an engineer turns off or freezes a layer globally in Model Space, unintentionally blanking out that layer across 15 other layout tabs.
2. Step-by-Step Resolution Protocol in AutoCAD & GstarCAD 2027
1. Batch-Lock All Layout Viewports (MVIEW > Lock > On)
Type -VPORTS (or MVIEW), choose Lock → On, and type All. Once locked, double-clicking inside a viewport and scrolling the wheel pans/zooms the entire Paper Space sheet safely without altering the viewport's custom scale.
2. Freeze Layers Per-Viewport Only (VP Freeze / LAYFRZ)
Double-click inside the target viewport (`MSPACE`), open the Layer Properties Manager (`LA`), and click the **VP Freeze** icon (sun/snowflake over a rectangle)—or run LAYFRZ and click an object. The layer disappears only inside that viewport.
3. Apply Viewport-Specific Color & Lineweight Overrides
Inside the Layer Properties Manager when a viewport is active, you can also set **VP Color** (e.g., Color 252 grey halftone) and **VP Lineweight** so architectural walls plot light grey on an MEP sheet while remaining bold black on the architectural sheet.
3. Automated AutoLISP Diagnostic & Repair Script (C:LOCKALLVP)
Load the following production AutoLISP routine into GstarCAD 2027 or AutoCAD via APPLOAD (or add it to gcaddoc.lsp) to automate this repair across affected project files:
(defun C:LOCKALLVP ( / ss i vportObj lockedCount)
(vl-load-com)
(setq lockedCount 0)
(if (setq ss (ssget "_X" '((0 . "VIEWPORT"))))
(repeat (setq i (sslength ss))
(setq vportObj (vlax-ename->vla-object (ssname ss (setq i (1- i)))))
;; Skip viewport ID 1 (the Paper Space sheet camera itself)
(if (> (vla-get-ViewportID vportObj) 1)
(progn
(vla-put-DisplayLocked vportObj :vlax-true)
(setq lockedCount (1+ lockedCount))
)
)
)
)
(princ (strcat "\n[LOCKALLVP] Locked scale on " (itoa lockedCount) " layout viewports."))
(princ)
)
4. Diagnostic System Variables & Edge-Case Matrix
| Failure Symptom / Scenario | Command / SysVar | Production Remediation Rule |
|---|---|---|
| Mouse wheel ruins calibrated 1:100 scale | MVIEW > Lock > On |
Locks AcDbViewport scale factor while still allowing activation. |
| Need layer hidden on Plan, visible on Section | VP Freeze / VPLAYER |
Freezes layer only inside the active viewport dictionary. |
| New layers created in Xref appear in all sheets | VPLAYERNEWFREEZE |
Freeze new layers by default across existing layout viewports. |
Experience Faster, Corruption-Free DWG Engineering in GstarCAD 2027
Built by Suzhou Gstarsoft Co., Ltd. (SSE: 688657), GstarCAD 2027 features multi-threaded DWG open/save, built-in RegApp/Scale-List scrubbers, and perpetual licensing.