Function Syntax: XREFOFFSETLAYER_006 / XREFOFFSETLAYER / XOL / XOFFSETCPLAYS_006 / XOFFSETCPLAYS Version: 1.0 Date: 20.07.2026 08:28:32 Version: 1.0 Date: 20.07.2026 4:28:17PM https://keanw.com/2009/05/enabling-autocads-offset-to-work-on-the-contents-of-xrefs-using-net.html 🚀 XrefOffsetLayer_006 XrefOffsetLayer_006 is an AutoCAD and Civil 3D 2024 .NET utility for selecting curve entities nested inside Xrefs and creating editable offset copies in the host drawing. It improves Xref-based CAD workflows by combining individual nested-entity picking, batch offset controls, nested-transform handling, current or source layer placement, session undo, and diagnostic logging. Main Commands 🧰 Run XREFOFFSETLAYER_006 to start the collision-safe build-specific Xref picker and offset workflow. ⚙️ Run XREFOFFSETLAYER as the stable full-name convenience alias. ⚡ Run XOL as the short everyday alias. 🗂️ Run XOFFSETCPLAYS_006 or XOFFSETCPLAYS to clone used Xref source layers into the host drawing and repoint eligible entities. SEO Optimized Description 📐 This AutoCAD Xref offset tool lets users select real curves nested inside attached or nested Xrefs, enter one offset distance, choose the offset side, and create checked offset copies in the active drawing space. 🔍 The utility supports CAD cleanup, Xref drafting, utility plans, Civil 3D production, referenced-base mapping, linework extraction, parallel geometry creation, and workflows where selected Xref curves must become editable host-drawing offsets. 🧠 It uses Editor.GetNestedEntity and FullSubentityPath for exact nested picks, then transforms a temporary clone through every container before calling Curve.GetOffsetCurves. 📌 XrefOffsetLayer_006 is useful for CAD technicians, Civil 3D users, survey drafting, utility networks, roadway plans, base-map tracing, construction documents, and repetitive Xref geometry offset tasks. Functionalities 🚀 Modeless C# workflow - keeps a resizable, minimizable, and maximizable Windows Forms interface open while users select and process Xref entities. 🎯 Real nested entity picking - obtains the actual nested ObjectId and its full block-reference container chain. 🔒 Xref-only validation - rejects entities that are nested only in normal blocks and are not inside an external reference. Individual highlighting - highlights only the selected nested piece through a FullSubentityPath. 📋 Multiple-pick grid - displays YES/NO, index, type, Xref or block path, handle, source layer, and processing status. 🚫 Unsupported-pick protection - rejects duplicate picks, text objects, Polyline3d entities, and non-Curve objects or marks them as not offsettable. 📐 Supported curve offsets - processes common lines, arcs, circles, ellipses, lightweight polylines, and splines when AutoCAD supports the selected shape and distance. ↔️ Distance and direction - accepts a non-zero distance and uses Flip direction to reverse the signed offset side. ☑️ Selective Apply - creates offsets only for checked and apply-capable rows. 🧭 Nested transform handling - applies every Xref and block transform in innermost-to-outermost order so nested geometry lands in the correct world position. 🛡️ Host-resident offset engine - appends a temporary clone to the current space before offsetting, preventing cross-database eWrongDatabase failures. 🧹 Temporary clone cleanup - erases the host stand-in after the offset result is created so only the new offset geometry remains. 🗂️ Current layer mode - places generated offset entities directly on the active AutoCAD layer. 📁 Source Xref layer mode - preserves source-layer organization and automatically runs the source-layer cloning workflow after a successful Apply. 🔄 Copy source layers - reads source Xref drawings, clones matching unmangled layer definitions into the host drawing, and repoints eligible current-space entities. Apply and OK behavior - Apply Offset creates confirmed geometry and keeps the form open, while OK performs the same operation and closes it. ↩️ Undo Apply - removes every entity created by the latest Apply Offset operation during the active dialog session. 🧹 Row and highlight cleanup - removes one selected row or clears all picks and their viewport highlights. 📊 Copy entity table - copies all grid headers and rows as tab-separated text for Excel or Notepad. 📝 Command logging - records picks, Xref paths, handles, layers, offsets, created results, skips, layer-copy activity, and errors. 📋 Clear, copy, and save log - clears logger history, copies the current log, or saves a timestamped diagnostic TXT file with picked-entity details. 💾 Persistent settings - saves window bounds, current or source layer mode, last distance, and Flip direction in XrefOffsetLayer.cfg. 🧪 Side-by-side test builds - uses generated build-numbered DLL and primary command names so several NETLOADed versions can coexist. Practical Result ✅ The result is editable host-drawing offset geometry created from checked curves inside attached or nested Xrefs, with correct nested transformations and without modifying the referenced source drawing. This makes XrefOffsetLayer_006 useful for Xref drafting, Civil 3D support drawings, base-map offsets, utility linework, CAD production cleanup, and selective referenced-geometry extraction. Important Note This command creates new geometry in the host drawing and does not change the Xref source. Curve.GetOffsetCurves determines which entity types, shapes, and distances can produce a valid offset. There is no interactive pick-a-side step. Use Flip direction and Undo Apply when needed. Undo Apply removes only the latest result while the dialog remains open, and source-layer cloning requires access to the external DWG files.