MODIFY COMMAND FIXES

How to Fix TRIM and EXTEND Not Cutting at Apparent or 3D Intersections (PROJMODE & EDGEMODE)

Fix TRIM and EXTEND commands failing to recognize cutting edges, implied extensions, or 3D elevated lines by configuring PROJMODE = 1 and EDGEMODE in GstarCAD.

⚡ Quick Engineering Answer (TL;DR)

Type PROJMODE and set it to 1 (UCS XY Plane projection) so TRIM and EXTEND cut lines even if they sit at different Z elevations. Type EDGEMODE and set it to 0 (require actual intersection) or 1 (trim/extend to implied infinite extensions of cutting edges).

1. Root Cause & DWG Database Symptom Analysis

When TRIM or EXTEND ignores an obvious intersection right under your crosshairs, the culprit is almost always PROJMODE (3D projection mode) or EDGEMODE (implied edge extension mode).

2. Step-by-Step Resolution in GstarCAD & AutoCAD

Step 1: Set PROJMODE = 1 to Trim Across Different Z Elevations

If a civil contour at $Z = 50\text{ m}$ crosses a parcel boundary at $Z = 0\text{ m}$, they do not physically intersect in 3D space (`PROJMODE = 0`). Type PROJMODE and enter 1 (Project to current UCS XY plane) or 2 (Project to current View direction)—now `TRIM` and `EXTEND` slice cleanly across any Z elevation.

Step 2: Control Implied Infinite Cutting Edges via EDGEMODE (0 vs. 1)

When EDGEMODE = 1, GstarCAD treats every selected cutting line as infinitely long, which can cause `TRIM` to snip segments at invisible phantom extensions across the drawing. Set EDGEMODE = 0 so lines only trim at physical intersections.

Step 3: Hold SHIFT Inside TRIM to EXTEND (and Vice Versa)

While inside the `TRIM` command, simply hold down the SHIFT key and click any line to `EXTEND` it—no need to exit and launch a separate command!

3. System Variables & Command Diagnostic Table

Variable / Command Default / Target Value Diagnostic Function & Fix Behavior
PROJMODE = 1 UCS XY Projection (Recommended) Trims and extends objects even when their Z elevations differ
PROJMODE = 0 True 3D Intersection Only Fails to trim if two lines miss each other in Z by 0.0001 mm
EDGEMODE = 0 Actual Edges Only Prevents accidental trimming against invisible infinite line extensions
EDGEMODE = 1 Implied Extension On Extends or trims to the imaginary infinite projection of the cutting edge

4. One-Click AutoLISP Fix Script (AutoLISP Optimal TRIM / EXTEND Projection Configuration)

(defun c:FIX-TRIM-MODES ()
  (setvar "PROJMODE" 1) ; Project cutting edges onto UCS XY plane
  (setvar "EDGEMODE" 0) ; Only cut at actual intersections (no phantom infinite edges)
  (princ "\n[Trim/Extend Fixed] PROJMODE=1 (UCS Projection), EDGEMODE=0 (Actual Edges).")
  (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 TRIM and EXTEND Not Cutting at Apparent or 3D Intersections (PROJMODE & EDGEMODE) 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)

  1. 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 / .dws standards file via CHECKSTANDARDS.
  2. Coordinate & Unit Integrity: Run -DWGUNITS or check INSUNITS, LUNITS, and MEASUREMENT to guarantee 1:1 metric (`mm`/`m`) or imperial (`in`/`ft`) block and Xref insertion scaling, with OSNAPZ = 1 preventing unintended 3D elevation drift.
  3. 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:

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.

Download Free 30-Day Trial → All Troubleshooting FAQs AutoCAD Migration Hub