CGCADGuide.tools
CAD Performance & Annotation Optimizer

CAD Viewport scale reset and cleaner

Resolve copy lag caused by thousands of garbage scales imported from external reference (Xref) loop nesting. One-click generation of LISP cleaners that reset defaults and rebuild common standard scales on demand.

Rebuild scale selection

Scale List Checklist

Check the boxes you want to keep in CAD after reset and add them automatically**Core Standard Scale**. Unchecked scales will be completely deleted, Keep the viewport list clean.

Viewport ratio list slimming demo

Viewport Scale List Cleaner Simulator

Bloated scale list (Xref contamination)
1:10_xref_xref_xref_copy1
1:50_copy_1_2
1:100_nested_ref_floor
1:5_xref_elevation
1:20_xref_copy
1:500_copy_copy_1
1:1000_xref_nested
Reset after purification (refresh core ratio)
Waiting for reset to start...
Scale lists split exponentially when drawings are contaminated with external references. Reset and rebuild resolves CAD copy-paste stuck issue.

LISP Code preview

Copy and load this section directly in CAD LISP Start slimming down and refactoring the code

;; =========================================================================
;; AutoCAD Scale List Purge & Reconstruction Utility
;; Generated by CADGuide.tools
;; -------------------------------------------------------------------------
;; 💡 Usage: 
;; 1. Open CAD, enter APPLOAD Load this LISP file. 
;; 2. Type ResetScaleList in the command line and press Enter to run.. 
;; =========================================================================

(defun c:ResetScaleList (/)
  (setvar "CMDECHO" 0)
  (princ "\n[CADGuide] Initializing drawing viewport scale data...")
  
  ;; Step 1: Run CAD Built-in command line scale reset, first restore factory configuration
  (command "-SCALELISTEDIT" "Reset" "Yes" "Exit")
  
  ;; Step 2: Use the dictionary function to completely cancel the proportion list data, Prevent redundant caching of xrefs
  (dictremove (namedobjdict) "ACAD_SCALELIST")
  
  ;; Step 3: Reactivate and create a clean scale list dictionary
  (command "-SCALELISTEDIT" "Reset" "Yes" "Exit")
  
  ;; Step 4: According to your configuration, Automatic writing of preserved/reconstructed standard scales on demand
  (princ "\n[CADGuide] Rebuilding the selected standard scale structure...")
  (command "-SCALELISTEDIT" "Add" "1:1" "1:1" "Exit")
  (command "-SCALELISTEDIT" "Add" "1:2" "1:2" "Exit")
  (command "-SCALELISTEDIT" "Add" "1:5" "1:5" "Exit")
  (command "-SCALELISTEDIT" "Add" "1:10" "1:10" "Exit")
  (command "-SCALELISTEDIT" "Add" "1:20" "1:20" "Exit")
  (command "-SCALELISTEDIT" "Add" "1:50" "1:50" "Exit")
  (command "-SCALELISTEDIT" "Add" "1:100" "1:100" "Exit")
  (command "-SCALELISTEDIT" "Add" "1:200" "1:200" "Exit")
  (command "-SCALELISTEDIT" "Add" "1:500" "1:500" "Exit")
  (command "-SCALELISTEDIT" "Add" "1:1000" "1:1000" "Exit")
  
  (setvar "CMDECHO" 1)
  (princ "\n[CADGuide] The scale list was reset successfully! Invalid reference scales have been eliminated. ")
  (princ)
)

Advanced Guide to Expanding and Resetting Scale Lists

CAD Viewport Scale List Bloat Diagnostic & Reset Guide

1. Why does copying and pasting cause lag?

Execute in CAD Ctrl+C and Ctrl+V, The software must map and merge the annotation scale of the entity in the clipboard with the scale list of the target drawing one by one. If your drawing accumulates hundreds of junk custom scale aliases from different xref drawings, This mapping calculation will fall into an infinite loop calculation that can last for several seconds or even minutes.**, Causes interface lag. Completely resetting and cleaning the scale is the most effective way to solve the lag..

2. Dictionary cleaning command with -SCALELISTEDIT

AutoCAD Starting from the 2008 version, a file called `ACAD_SCALELIST` Exclusive Named Object Dictionary. Regular cleanup commands cannot delete this system-level container dictionary.. So in AutoLISP, We use the underlying forced removal command `(dictremove (namedobjdict) "ACAD_SCALELIST")` to force logout, Force CAD to release all invalid references, Then call `-SCALELISTEDIT` to rebuild.

3. Automatic scale cleaning of multiple images in batches

You can also use the LISP named functions generated by this tool with Tool 2 Batch processing for use with `.scr` script files. Just replace the `CleanDwg` command with this `ResetScaleList`, You can silently and automatically handle the resetting and clearing of the scale list of multiple drawings, minimizing the workload..