Function Syntax: OffsetAndLayer Version: 1.0 Date: 20.06.2026 6:39:00PM N/A Description 🧩 OffsetAndLayer offsets selected planar curve objects inward or outward by a chosen distance and assigns the new offset geometry to a selected drawing layer. 🎛️ A DCL dialog provides Inward or Outward direction offset distance layer name filtering and a layer dropdown. 💾 The last offset value selected layer and direction are stored in the AutoCAD environment for reuse. Function Syntax Main command: OffsetAndLayer SEO Optimized Overview 📏 The default offset distance is 0.20 when no saved value exists. 🗂️ The layer list excludes Xref dependent layers containing the vertical bar separator. 🔎 The Filter Layers field performs case insensitive substring matching over the available layer names. ↔️ The direction can be selected as Inward or Outward and Inward is the default when no saved direction exists. 🖱️ After dialog acceptance the user selects POLYLINE ARC CIRCLE ELLIPSE or SPLINE style objects. 📐 The routine excludes AcDb3dPolyline and requires vlax curve planarity. 🧮 A first positive offset is created and its Area is compared with the source Area to determine whether the direction matches Inward or Outward. 🔄 When the first sign gives the wrong area relationship the offset is deleted and the opposite sign is tried. 🗂️ Successful new offset geometry is assigned to the selected target layer. Primary Workflow • Run OffsetAndLayer. • Choose Inward or Outward. • Enter the offset distance. • Filter the layer list if required and choose the target layer. • Click OK. • Select the planar curve objects to offset. • The routine creates the requested directional offset and assigns each successful result to the selected layer. Functionalities Inward offset - chooses the sign producing a smaller area when possible. Outward offset - chooses the sign producing a larger area when possible. Editable distance - accepts a numeric offset value. Layer filter - searches the available user layers by name. Layer dropdown - assigns new geometry to the chosen drawing layer. Xref layer exclusion - hides dependent Xref layers from the target list. Planar curve validation - skips non planar objects and 3D polylines. Automatic sign correction - retries the opposite offset sign when the first result moves in the wrong direction. Persistent settings - stores last distance layer and direction using setenv. Undo grouping - wraps the operation in an AutoCAD undo mark. Important Commands and Aspects 🧩 get-all-layers collects non Xref drawing layer names. 🧩 update-layer-list filters the DCL layer dropdown. 🧩 vla-offset creates candidate offset geometry. 🧩 Area comparison determines inward versus outward direction. Result 🎯 The result is offset curve geometry on the selected destination layer. ↔️ The routine attempts to ensure the resulting offset direction matches the requested Inward or Outward choice. Important Notes ⚠️ The direction test depends on the source and offset entities exposing meaningful Area values. ⚠️ AcDb3dPolyline entities are explicitly excluded. ⚠️ The current selection filter includes polyline arc circle ellipse and spline categories. SEO Keywords 🏷️ AutoCAD, 🏷️ Civil 3D, 🏷️ AutoLISP, 🏷️ OffsetAndLayer, 🏷️ Offset inward, 🏷️ Offset outward, 🏷️ Layer assignment, 🏷️ Layer filter, 🏷️ Planar curve, 🏷️ VLA Offset, 🏷️ CAD automation