DuplicateToNewLayer

Short description

🧩 DuplicateToNewLayer and CloseParallelPolylines is an AutoCAD and Civil 3D DCL offset utility for creating left and right offsets from selected LINE LWPOLYLINE POLYLINE SPLINE and ARC geometry.
🎛️ The interface combines offset profiles independent left and right distances target layer controls optional source deletion parallel closing optional centerline generation Apply Undo OK and Cancel.
📚 Built in profiles cover Profile_000 cable channel sizes and Profile_003 through Profile_003 duct bundle configurations.

Command:

Main command: DuplicateToNewLayer and CloseParallelPolylines

Description:

📐 The current execution workflow asks the user to select one or more compatible curve objects and creates separate right and left offsets through the VLA Offset method.
📚 The profile list automatically fills matched left and right distances for Profile_000 Profile_003 cable channel sizes and Profile_003 bundle presets.
🗂️ Place offsets on layer enables a filtered non Xref layer list and a Pick Layer From Drawing option.
🧬 When a target layer is enabled the current source moves the original object to that target layer before generating the offsets so the new offsets inherit the same layer.
🗑️ Delete original object can erase the selected source after offset generation.
🔗 Close Parallel Polylines joins one right and one left offset by calculating the shorter endpoint pairing adding two connector lines and using PEDIT Join.
➗ Create centerline polyline can generate a safe sampled centerline by averaging points on the first offset with closest points on the second offset.
📏 The safe centerline currently samples forty intervals along the first offset curve.
↩️ Apply creates one processing pass and keeps the dialog workflow active while Undo reverses the previous Apply operation.
✅ OK runs one processing pass when no Apply has yet been used then closes and commits the current undo group.
❌ Cancel reverses all Apply operations made during the current command session.

Helper function: (if any)​

DTNLCPP-OffsetResult-DTNLCPP->Enames converts VLA Offset results into AutoCAD entity names.
DTNLCPP-CreateCenterlineSafe-DTNLCPP samples the offset pair and creates an averaged lightweight polyline centerline.
DTNLCPP-CloseTwoParallelEntities-DTNLCPP adds endpoint connectors and joins the offset pair.
DTNLCPP-GetAllLayers-DTNLCPP returns non Xref drawing layers.
DTNLCPP-DoOffsetOnce-DTNLCPP performs the current object selection and left and right offset processing.

Functionalities:

✅ Independent left and right offsets – allows different offset distances on each side.
✅ Engineering profiles – provides preset Profile_000 cable channel and Profile_003 bundle dimensions.
✅ Multiple object selection – accepts LINE LWPOLYLINE POLYLINE SPLINE and ARC geometry.
✅ Filtered layer picker – filters non Xref layers by user entered name text.
✅ Pick layer from drawing – reads the target layer from a selected drawing entity.
✅ Optional source deletion – erases the original after offset generation when enabled.
✅ Parallel closing – adds two endpoint connector lines and joins the new offset pair.
✅ Automatic endpoint pairing – chooses the lower total endpoint connection distance.
✅ Safe centerline – creates a sampled midpoint LWPOLYLINE between the two offsets.
✅ Apply workflow – creates repeated processing passes without closing the tool.
✅ Undo workflow – rolls back the most recent Apply operation.
✅ Cancel rollback – reverses every Apply made during the current command session.
✅ Persistent UI values – keeps profile offsets deletion layer filter selection mode and close options in global variables.

Result:

🎯 The result is a pair of left and right offset entities for every selected source curve.
🔗 In Close mode a valid one plus one offset pair is connected and joined into closed parallel geometry.
➗ When enabled an additional sampled centerline lightweight polyline is generated between the two offsets.

Images, animations etc.

Pixel

XAML code:

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:Autodesk.Windows;assembly=AdWindows">
    
<src:RibbonToolTip x:Key="DuplicateToNewLayer&amp;CloseParallelPolylines">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: Command</Bold>
<LineBreak/>
<Bold>Version: 1.0 Date:</Bold>
<LineBreak/>
<LineBreak/>
<Hyperlink>N/A</Hyperlink>
<LineBreak/>
</TextBlock>

<Bold><Run Foreground="DodgerBlue">Description</Run></Bold><LineBreak/>
<Run Foreground="White">🧩 DuplicateToNewLayer and CloseParallelPolylines is an AutoCAD and Civil 3D DCL offset utility for creating left and right offsets from selected LINE LWPOLYLINE POLYLINE SPLINE and ARC geometry.</Run><LineBreak/>
<Run Foreground="White">🎛️ The interface combines offset profiles independent left and right distances target layer controls optional source deletion parallel closing optional centerline generation Apply Undo OK and Cancel.</Run><LineBreak/>
<Run Foreground="White">📚 Built in profiles cover Schutzrohr cable channel sizes and DN300 through DN1000 duct bundle configurations.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Function Syntax</Run></Bold><LineBreak/>
<Run Foreground="White">Main command: </Run><Bold><Run Foreground="Orange">DuplicateToNewLayer and CloseParallelPolylines</Run></Bold><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">SEO Optimized Overview</Run></Bold><LineBreak/>
<Run Foreground="White">📐 The current execution workflow asks the user to select one or more compatible curve objects and creates separate right and left offsets through the VLA Offset method.</Run><LineBreak/>
<Run Foreground="White">📚 The profile list automatically fills matched left and right distances for Schutzrohr DN110 cable channel sizes and DN bundle presets.</Run><LineBreak/>
<Run Foreground="White">🗂️ Place offsets on layer enables a filtered non Xref layer list and a Pick Layer From Drawing option.</Run><LineBreak/>
<Run Foreground="White">🧬 When a target layer is enabled the current source moves the original object to that target layer before generating the offsets so the new offsets inherit the same layer.</Run><LineBreak/>
<Run Foreground="White">🗑️ Delete original object can erase the selected source after offset generation.</Run><LineBreak/>
<Run Foreground="White">🔗 Close Parallel Polylines joins one right and one left offset by calculating the shorter endpoint pairing adding two connector lines and using PEDIT Join.</Run><LineBreak/>
<Run Foreground="White">➗ Create centerline polyline can generate a safe sampled centerline by averaging points on the first offset with closest points on the second offset.</Run><LineBreak/>
<Run Foreground="White">📏 The safe centerline currently samples forty intervals along the first offset curve.</Run><LineBreak/>
<Run Foreground="White">↩️ Apply creates one processing pass and keeps the dialog workflow active while Undo reverses the previous Apply operation.</Run><LineBreak/>
<Run Foreground="White">✅ OK runs one processing pass when no Apply has yet been used then closes and commits the current undo group.</Run><LineBreak/>
<Run Foreground="White">❌ Cancel reverses all Apply operations made during the current command session.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="LimeGreen">Primary Workflow</Run></Bold><LineBreak/>
<Run Foreground="White">• Run DuplicateToNewLayer and CloseParallelPolylines.</Run><LineBreak/>
<Run Foreground="White">• Select or edit an offset profile or enter independent Left and Right distances.</Run><LineBreak/>
<Run Foreground="White">• Optionally enable target layer assignment and choose a layer through filter list or drawing pick.</Run><LineBreak/>
<Run Foreground="White">• Choose whether the original object should be deleted.</Run><LineBreak/>
<Run Foreground="White">• Choose Close Parallel Polylines or leave the generated offsets unclosed.</Run><LineBreak/>
<Run Foreground="White">• Choose whether a centerline polyline should be generated when closing.</Run><LineBreak/>
<Run Foreground="White">• Use Apply and then select one or more LINE LWPOLYLINE POLYLINE SPLINE or ARC objects.</Run><LineBreak/>
<Run Foreground="White">• Use Undo to reverse the previous Apply operation.</Run><LineBreak/>
<Run Foreground="White">• Use OK to perform a first pass when required and close the dialog.</Run><LineBreak/>
<Run Foreground="White">• Use Cancel to roll back Apply operations from the current command.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="LimeGreen">Functionalities</Run></Bold><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Independent left and right offsets</Run></Bold><Run Foreground="White"> - allows different offset distances on each side.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Engineering profiles</Run></Bold><Run Foreground="White"> - provides preset Schutzrohr cable channel and DN bundle dimensions.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Multiple object selection</Run></Bold><Run Foreground="White"> - accepts LINE LWPOLYLINE POLYLINE SPLINE and ARC geometry.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Filtered layer picker</Run></Bold><Run Foreground="White"> - filters non Xref layers by user entered name text.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Pick layer from drawing</Run></Bold><Run Foreground="White"> - reads the target layer from a selected drawing entity.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Optional source deletion</Run></Bold><Run Foreground="White"> - erases the original after offset generation when enabled.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Parallel closing</Run></Bold><Run Foreground="White"> - adds two endpoint connector lines and joins the new offset pair.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Automatic endpoint pairing</Run></Bold><Run Foreground="White"> - chooses the lower total endpoint connection distance.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Safe centerline</Run></Bold><Run Foreground="White"> - creates a sampled midpoint LWPOLYLINE between the two offsets.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Apply workflow</Run></Bold><Run Foreground="White"> - creates repeated processing passes without closing the tool.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Undo workflow</Run></Bold><Run Foreground="White"> - rolls back the most recent Apply operation.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Cancel rollback</Run></Bold><Run Foreground="White"> - reverses every Apply made during the current command session.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Persistent UI values</Run></Bold><Run Foreground="White"> - keeps profile offsets deletion layer filter selection mode and close options in global variables.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Important Commands and Aspects</Run></Bold><LineBreak/>
<Run Foreground="White">🧩 DTNLCPP-OffsetResult-DTNLCPP->Enames converts VLA Offset results into AutoCAD entity names.</Run><LineBreak/>
<Run Foreground="White">🧩 DTNLCPP-CreateCenterlineSafe-DTNLCPP samples the offset pair and creates an averaged lightweight polyline centerline.</Run><LineBreak/>
<Run Foreground="White">🧩 DTNLCPP-CloseTwoParallelEntities-DTNLCPP adds endpoint connectors and joins the offset pair.</Run><LineBreak/>
<Run Foreground="White">🧩 DTNLCPP-GetAllLayers-DTNLCPP returns non Xref drawing layers.</Run><LineBreak/>
<Run Foreground="White">🧩 DTNLCPP-DoOffsetOnce-DTNLCPP performs the current object selection and left and right offset processing.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Result</Run></Bold><LineBreak/>
<Run Foreground="White">🎯 The result is a pair of left and right offset entities for every selected source curve.</Run><LineBreak/>
<Run Foreground="White">🔗 In Close mode a valid one plus one offset pair is connected and joined into closed parallel geometry.</Run><LineBreak/>
<Run Foreground="White">➗ When enabled an additional sampled centerline lightweight polyline is generated between the two offsets.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DarkRed">Important Notes</Run></Bold><LineBreak/>
<Run Foreground="White">⚠️ </Run><Bold><Run Foreground="DarkRed">The dialog displays a 2 Points selection mode but the current DTNLCPP-DoOffsetOnce-DTNLCPP execution path always calls the multi object selection routine and does not implement a distinct two point processing path.</Run></Bold><LineBreak/>
<Run Foreground="White">⚠️ </Run><Bold><Run Foreground="DarkRed">The Unclose Parallel Polylines radio option currently prevents the close action and leaves newly created offsets open rather than actively opening previously closed geometry.</Run></Bold><LineBreak/>
<Run Foreground="White">⚠️ </Run><Bold><Run Foreground="DarkRed">When Place offsets on layer is enabled the current implementation changes the source object layer before creating the offsets.</Run></Bold><LineBreak/>
<Run Foreground="White">⚠️ </Run><Bold><Run Foreground="DarkRed">Close mode requires exactly one right and one left entity from the VLA Offset result for the selected source object.</Run></Bold><LineBreak/>
<Run Foreground="White">⚠️ </Run><Bold><Run Foreground="DarkRed">The current centerline is an approximation based on forty sample intervals and closest point averaging.</Run></Bold><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="Yellow">SEO Keywords</Run></Bold><LineBreak/>
<Run Foreground="Yellow">🏷️ AutoCAD, 🏷️ Civil 3D, 🏷️ AutoLISP, 🏷️ Multiple offset, 🏷️ Parallel polylines, 🏷️ Close parallel polylines, 🏷️ Centerline, 🏷️ Schutzrohr, 🏷️ Cable channel, 🏷️ DN bundle, 🏷️ Layer assignment, 🏷️ VLA Offset, 🏷️ PEDIT Join, 🏷️ DCL, 🏷️ CAD automation</Run><LineBreak/>



          
<Grid>
<Image Source="PNG" Stretch="Uniform"/>
</Grid>
<Grid>
<MediaElement
 Source="GIF"
 Stretch="Uniform"
 Visibility="Visible"/>
 </Grid>
</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>

Additional info:

Share this page:

Leave a Reply

Page Tag: 🏷️ Civil 3D

  • DuplicateToNewLayer

    Short description🧩 DuplicateToNewLayer and CloseParallelPolylines is an AutoCAD and Civil 3D DCL offset utility for creating left and right offsets from selected LINE LWPOLYLINE POLYLINE SPLINE and ARC geometry. 🎛️ The interface combines offset profiles independent left and right distances target layer controls optional source deletion parallel closing optional centerline generation Apply Undo OK and…

  • DeleteLayerByFilter

    Short description🧹 DeleteLayerByFilter is an AutoCAD and Civil 3D AutoLISP utility for finding, exporting, and deleting layers by multiple wildcard filter patterns. 🛡️ The tool uses a DCL dialog with protected layer patterns, confirmation prompts, preset filters, inverse matching, and export options so CAD users can clean drawings more safely and systematically. Command:🚀 Main command:…

  • Color2Llayers

    Short description🎨 Color2Llayers is an AutoCAD AutoLISP Extended Layer Color Changer with a DCL list, wildcard filter, multi-select, pick color, apply, undo, clipboard export, and dialog position memory. 🧰 It edits layer color values directly and uses a reopen-after-Apply pattern so AutoCAD can regenerate and show color changes immediately. Command:🚀 Main color changer command: XCC…

  • ChangeLayerToCurrent

    Short description🗂️ ChangeLayerToCurrent is an AutoCAD AutoLISP layer reassignment tool with a dynamic DCL layer selector, filtering, pick-from-object support, and clipboard helper. 🎯 It changes multiple selected objects to a chosen layer and optionally preserves original displayed linetype, linetype scale, and lineweight/width. Command:🚀 Layer change command: ChangeLayerToCurrent – opens a searchable layer selector and moves…

  • All_Color2Layers

    Short description🎨 All_Color2Layers is an AutoCAD AutoLISP ByLayer cleanup utility for resetting entity color and/or linetype overrides to BYLAYER. 🧰 It adds a DCL interface with operation options, scope controls, layout filtering, layer selection, settings memory, and undo support. Command:🚀 Main dialog command: BYLAYERDLG – opens the ByLayer Tool DCL interface 🚀 Alias command: BYLAYER…

  • SplitHatch

    Short description🟧 SplitHatch is a compact AutoCAD AutoLISP command for separating selected multi-boundary hatches through HATCHEDIT. ✂️ It keeps hatch angle and scale behavior under AutoCAD’s native hatch separation workflow while applying the operation to one or more selected hatches. Command:🚀 Split hatch command: SplitHatch – separates selected multi-boundary hatch objects Description:✂️ SplitHatch is an…

  • MleaderStraight

    Short description📐 MleaderStraight is an AutoCAD and Civil 3D AutoLISP utility for straightening selected MultiLeader leader lines into clean horizontal or vertical orthogonal segments. 🧭 The tool includes a compact DCL chooser that can process either manually selected MLeader objects or every MultiLeader in the current Model/Paper space layout. Command:🚀 Main command: MleaderStraightTools 📌 Selection…

  • ConvertLeaderAndText2Mleader

    Short description🏷️ AutoCAD AutoLISP tool for converting old LEADER plus MTEXT annotation pairs into modern MLEADER objects while preserving text, style, layer, rotation, formatting options, and annotation workflow. Command:🧰 Main commands: LTM and Leader_To_Multileader. Run LTM for the short command alias or Leader_To_Multileader for the full command name. Description:🚀 ConvertLeaderAndText2Mleader is an AutoCAD and Civil…

  • AddVertex2Mleader

    Short description🧩 AddVertex2Mleader is an AutoCAD AutoLISP utility that adds a new vertex point to a selected MULTILEADER object, helping CAD users adjust leader geometry quickly without rebuilding the annotation. Command:🚀 Main command: AddVertex2Mleader Type AddVertex2Mleader in the AutoCAD command line, select a MULTILEADER object, then pick the point where the new leader vertex should…

  • TrimIn_TrimOut_Boundary

    Short descriptionRectangle-based AutoLISP trim and erase utility for keeping or removing geometry inside or outside a selected boundary. Command:CUT SCB SC SCD Description:TrimIn_TrimOut_Boundary is an AutoLISP boundary-cleanup routine based on the enhanced multi-trim SECTION workflow by Bob Jones with a dialog interface added by Jim Arthur. It prompts the user for two rectangle corners and…