OffsetAndLayer

Short 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.

Image 000 38

Command:

Main command: OffsetAndLayer

Description:

๐Ÿ“ 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.

Helper function: (if any)โ€‹

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.

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.

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.

Images, animations etc.

Image 000 38
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="OffsetAndLayer">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: OffsetAndLayer</Bold>
<LineBreak/>
<Bold>Version: 1.0 Date: 20.06.2026 6:39:00PM</Bold>
<LineBreak/>
<Hyperlink>N/A</Hyperlink>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Description</Run></Bold><LineBreak/>
<Run Foreground="White">๐Ÿงฉ OffsetAndLayer offsets selected planar curve objects inward or outward by a chosen distance and assigns the new offset geometry to a selected drawing layer.</Run><LineBreak/>
<Run Foreground="White">๐ŸŽ›๏ธ A DCL dialog provides Inward or Outward direction offset distance layer name filtering and a layer dropdown.</Run><LineBreak/>
<Run Foreground="White">๐Ÿ’พ The last offset value selected layer and direction are stored in the AutoCAD environment for reuse.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Function Syntax</Run></Bold><LineBreak/>
<Run Foreground="White">Main command: </Run><Bold><Run Foreground="Orange">OffsetAndLayer</Run></Bold><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">SEO Optimized Overview</Run></Bold><LineBreak/>
<Run Foreground="White">๐Ÿ“ The default offset distance is 0.20 when no saved value exists.</Run><LineBreak/>
<Run Foreground="White">๐Ÿ—‚๏ธ The layer list excludes Xref dependent layers containing the vertical bar separator.</Run><LineBreak/>
<Run Foreground="White">๐Ÿ”Ž The Filter Layers field performs case insensitive substring matching over the available layer names.</Run><LineBreak/>
<Run Foreground="White">โ†”๏ธ The direction can be selected as Inward or Outward and Inward is the default when no saved direction exists.</Run><LineBreak/>
<Run Foreground="White">๐Ÿ–ฑ๏ธ After dialog acceptance the user selects POLYLINE ARC CIRCLE ELLIPSE or SPLINE style objects.</Run><LineBreak/>
<Run Foreground="White">๐Ÿ“ The routine excludes AcDb3dPolyline and requires vlax curve planarity.</Run><LineBreak/>
<Run Foreground="White">๐Ÿงฎ A first positive offset is created and its Area is compared with the source Area to determine whether the direction matches Inward or Outward.</Run><LineBreak/>
<Run Foreground="White">๐Ÿ”„ When the first sign gives the wrong area relationship the offset is deleted and the opposite sign is tried.</Run><LineBreak/>
<Run Foreground="White">๐Ÿ—‚๏ธ Successful new offset geometry is assigned to the selected target layer.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="LimeGreen">Primary Workflow</Run></Bold><LineBreak/>
<Run Foreground="White">โ€ข Run OffsetAndLayer.</Run><LineBreak/>
<Run Foreground="White">โ€ข Choose Inward or Outward.</Run><LineBreak/>
<Run Foreground="White">โ€ข Enter the offset distance.</Run><LineBreak/>
<Run Foreground="White">โ€ข Filter the layer list if required and choose the target layer.</Run><LineBreak/>
<Run Foreground="White">โ€ข Click OK.</Run><LineBreak/>
<Run Foreground="White">โ€ข Select the planar curve objects to offset.</Run><LineBreak/>
<Run Foreground="White">โ€ข The routine creates the requested directional offset and assigns each successful result to the selected layer.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="LimeGreen">Functionalities</Run></Bold><LineBreak/>
<Run Foreground="White">โœ… </Run><Bold><Run Foreground="LimeGreen">Inward offset</Run></Bold><Run Foreground="White"> - chooses the sign producing a smaller area when possible.</Run><LineBreak/>
<Run Foreground="White">โœ… </Run><Bold><Run Foreground="LimeGreen">Outward offset</Run></Bold><Run Foreground="White"> - chooses the sign producing a larger area when possible.</Run><LineBreak/>
<Run Foreground="White">โœ… </Run><Bold><Run Foreground="LimeGreen">Editable distance</Run></Bold><Run Foreground="White"> - accepts a numeric offset value.</Run><LineBreak/>
<Run Foreground="White">โœ… </Run><Bold><Run Foreground="LimeGreen">Layer filter</Run></Bold><Run Foreground="White"> - searches the available user layers by name.</Run><LineBreak/>
<Run Foreground="White">โœ… </Run><Bold><Run Foreground="LimeGreen">Layer dropdown</Run></Bold><Run Foreground="White"> - assigns new geometry to the chosen drawing layer.</Run><LineBreak/>
<Run Foreground="White">โœ… </Run><Bold><Run Foreground="LimeGreen">Xref layer exclusion</Run></Bold><Run Foreground="White"> - hides dependent Xref layers from the target list.</Run><LineBreak/>
<Run Foreground="White">โœ… </Run><Bold><Run Foreground="LimeGreen">Planar curve validation</Run></Bold><Run Foreground="White"> - skips non planar objects and 3D polylines.</Run><LineBreak/>
<Run Foreground="White">โœ… </Run><Bold><Run Foreground="LimeGreen">Automatic sign correction</Run></Bold><Run Foreground="White"> - retries the opposite offset sign when the first result moves in the wrong direction.</Run><LineBreak/>
<Run Foreground="White">โœ… </Run><Bold><Run Foreground="LimeGreen">Persistent settings</Run></Bold><Run Foreground="White"> - stores last distance layer and direction using setenv.</Run><LineBreak/>
<Run Foreground="White">โœ… </Run><Bold><Run Foreground="LimeGreen">Undo grouping</Run></Bold><Run Foreground="White"> - wraps the operation in an AutoCAD undo mark.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Important Commands and Aspects</Run></Bold><LineBreak/>
<Run Foreground="White">๐Ÿงฉ get-all-layers collects non Xref drawing layer names.</Run><LineBreak/>
<Run Foreground="White">๐Ÿงฉ update-layer-list filters the DCL layer dropdown.</Run><LineBreak/>
<Run Foreground="White">๐Ÿงฉ vla-offset creates candidate offset geometry.</Run><LineBreak/>
<Run Foreground="White">๐Ÿงฉ Area comparison determines inward versus outward direction.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Result</Run></Bold><LineBreak/>
<Run Foreground="White">๐ŸŽฏ The result is offset curve geometry on the selected destination layer.</Run><LineBreak/>
<Run Foreground="White">โ†”๏ธ The routine attempts to ensure the resulting offset direction matches the requested Inward or Outward choice.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DarkRed">Important Notes</Run></Bold><LineBreak/>
<Run Foreground="White">โš ๏ธ </Run><Bold><Run Foreground="DarkRed">The direction test depends on the source and offset entities exposing meaningful Area values.</Run></Bold><LineBreak/>
<Run Foreground="White">โš ๏ธ </Run><Bold><Run Foreground="DarkRed">AcDb3dPolyline entities are explicitly excluded.</Run></Bold><LineBreak/>
<Run Foreground="White">โš ๏ธ </Run><Bold><Run Foreground="DarkRed">The current selection filter includes polyline arc circle ellipse and spline categories.</Run></Bold><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="Yellow">SEO Keywords</Run></Bold><LineBreak/>
<Run Foreground="Yellow">๐Ÿท๏ธ AutoCAD, ๐Ÿท๏ธ Civil 3D, ๐Ÿท๏ธ AutoLISP, ๐Ÿท๏ธ OffsetAndLayer, ๐Ÿท๏ธ Offset inward, ๐Ÿท๏ธ Offset outward, ๐Ÿท๏ธ Layer assignment, ๐Ÿท๏ธ Layer filter, ๐Ÿท๏ธ Planar curve, ๐Ÿท๏ธ VLA Offset, ๐Ÿท๏ธ CAD automation</Run><LineBreak/>


</TextBlock>
            
<Grid>
<Image Source="Image_000.jpg" Stretch="Uniform"/>
</Grid>

</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>

Additional info:

Share this page:

Leave a Reply

Page Tag: ๐Ÿท๏ธ Layer assignment

  • OffsetAndLayer

    โ€”

    by

    Short 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…

  • CopySelection_vs.03

    โ€”

    by

    Short description๐Ÿงฉ CopySelection v8 is an AutoCAD and Civil 3D AutoLISP curve duplication and transformation utility for creating new polyline geometry from selected portions of one or multiple source curves. ๐ŸŽ›๏ธ Its DCL interface combines curve selection layer assignment rotation translation repeated offsets endpoint extension optional parallel closing optional centerline creation Apply Undo OK Cancel…

  • DuplicateToNewLayer

    โ€”

    by

    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…