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.

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.

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>

Leave a Reply
You must be logged in to post a comment.