Short description
Purpose: Offset curves inward or outward and assign the results to a selected layer Supported geometry: *POLYLINE, ARC, CIRCLE, ELLIPSE, SPLINE (planar only) Session memory: Remembers last offset distance, last chosen layer, and last direction for faster repetitive usage

Command:
Command name: OffsetAndLayer Run method: Type OffsetAndLayer and press Enter Dialog controls: • Offset Direction — Inward or Outward • Offset Distance — numeric input parsed using distof • Filter Layers — wildcard text filter • Choose Layer — popup list populated from filtered layers Cancel behaviour: If dialog is canceled, no offset is performed and the routine ends immediately
Description:
This routine displays a dialog where the user picks a direction (In/Out), sets the offset distance, filters and selects a target layer, and then applies the offset operation to selected planar curves. It offsets each entity one by one and checks the resulting area to confirm whether the offset went inward or outward. If the offset direction is wrong, it deletes the result and automatically re-runs the offset with the reversed sign. After a valid offset is created, the new curve is placed on the selected layer. Objects that cannot be offset (e.g., too small) are counted and reported after processing.
Helper function: (if any)
• *error* — Handles unexpected errors, prints messages, and closes the undo mark • get-all-layers — Collects all user layers (excluding xref layers) and sorts them alphabetically • update-layer-list — Filters layer names using wildcard matching and repopulates the popup list • DCL generator — Creates a temporary DCL file defining the dialog UI with direction radios, edit boxes, and popup list • Environment storage — Saves OFFSETVAL, OFFSETLAYER, and OFFSETDIR for future sessions • Offset attempt logic — Tries offset, compares areas, deletes incorrect output, and retries with reversed sign when needed
Functionalities:
• Dialog-driven offset — Combines direction, distance, and layer control in one interface • Distance parsing — Converts the distance input from text to a numeric value using distof • Layer filtering — Allows narrowing down layer selection using wildcard text input • Planarity check — Only offsets 2D planar entities and skips 3D polylines or non-planar objects • Area-based direction check — Determines if offset is Inward or Outward by comparing the new area with the original • Automatic direction correction — Deletes and recreates the offset if wrong direction was applied • Layer assignment — Puts every created offset curve onto the selected layer • Failure counting — Tracks objects too small to offset inward and reports the number • Undo-safe execution — Encloses all operations within a single undo group • Temporary file handling — Deletes the temporary DCL file after the dialog closes
Result:
• Geometric result New offset curves are created for each valid planar object based on the chosen inward or outward offset • Layer result Every newly created offset entity is placed on the selected layer while the originals remain unchanged • Direction verification If the resulting area contradicts the chosen direction, the offset is reversed and recreated correctly • Failure report Objects that cannot be offset (typically too small for inward offset) are counted and reported to the user • Undo safety All operations are bracketed inside a single undo mark so the entire offset procedure can be undone at once
Images, animations etc.
Log in to download.
Log in
Log in
Additional info:
Learn more:
Open Website
Share this page:
Subscribe
Login
0 Comments
Oldest
