Function Syntax: VportsPoly2Rectang / VportShapeConv Version: 1.1 Date: 20.06.2026 6:38:56PM AI+https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xline-to-polyline/td-p/5504511 🚀 Command Name 🧩 Type VportsPoly2Rectang at the AutoCAD command line. 🧩 Type VportShapeConv at the AutoCAD command line. 🧭 SEO Optimized Description 🪟 VportsPoly2Rectang is an SEO-friendly AutoCAD viewport clipping utility for managing rectangular and non-rectangular viewports in paper space layouts. 🔍 The routine scans layout block table records using VLA iteration, which avoids unreliable ssget layout filtering when inactive layout tabs are involved. 🔄 It identifies polygonal clipped viewports through DXF clip references and non-rectangular viewport flags, then supports converting viewport shape states. 🔐 It includes lock/unlock status, viewport filtering, select all poly/rect viewport tools, zoom-to-selected, custom clip boundary options, and persisted settings. 🎯 This is useful for layout QA, clipped viewport cleanup, Civil 3D sheet production, and paper space viewport standardization. 🧰 Main Workflow 1️⃣ Run VportsPoly2Rectang or VportShapeConv. 2️⃣ Select layouts and review detected rectangular or polygonal viewports. 3️⃣ Filter the viewport list by All, Poly only, or Rect only. 4️⃣ Convert clipping shapes, lock/unlock viewports, or zoom to selected viewports. 5️⃣ Use undo-aware batch processing to review and roll back if needed. ✅ Functionalities ✅ 🪟 List viewports by layout with rectangular/poly status. ✅ 🔍 Filter visible viewports by All, Poly only, or Rect only. ✅ 🔐 Show and modify viewport locked/unlocked state. ✅ 🔄 Convert polygonal viewports to rectangular viewports. ✅ ✏️ Convert rectangular viewports to custom polygonal clipping boundaries. ✅ 🖱️ Select all poly viewports or all rectangular viewports quickly. ✅ 🔎 Zoom to the selected viewport for visual checking. ✅ 💾 Persist dialog options and clip boundary layer settings between sessions. 🧩 Important Commands and Helper Functions 🧩 VLA layout iteration scans each layout block table record reliably. 🧩 DXF group 340 and DXF 90 bit checks detect non-rectangular clipped viewports. 🧩 Registry helpers persist user settings between sessions. 🧩 DCL builders create the two-panel layout and viewport interface. 🧩 Undo helpers group batch conversion, lock, and unlock operations safely. 🧩 Zoom helpers switch layouts and focus the selected viewport. 🎯 Practical Result 🎯 The result is a controlled viewport cleanup and conversion workflow for AutoCAD and Civil 3D sheet layouts. 🪟 Users can locate problematic polygonal viewports, lock or unlock viewport sets, convert clipping shapes, and standardize sheets more efficiently. ✅ The tool improves paper space QA for drawings with many layouts and mixed viewport types. ⚠️ Important Notes ⚠️ Viewport clipping changes can affect plotted sheet appearance; test on a copy or use undo after batch operations. ⚠️ Custom Rect-to-Poly conversion requires a valid closed boundary object such as a polyline, circle, ellipse, or spline. ⚠️ Locked viewport state should be reviewed after conversion to avoid accidental view movement. 🏷️ Tags 🏷️ AutoCAD, 🏷️ Civil 3D, 🏷️ AutoLISP, 🏷️ Visual LISP, 🏷️ Viewport, 🏷️ Viewport Clipping, 🏷️ Polygonal Viewport, 🏷️ Rectangular Viewport, 🏷️ Paper Space, 🏷️ Layouts, 🏷️ DXF 340, 🏷️ Viewport Lock, 🏷️ DCL Dialog, 🏷️ CAD Automation, 🏷️ Sheet QA