MultiOffsetBothSidesWithLayer

Short description

This AutoLISP routine automates the process of offsetting multiple lines on both sides with customizable distances, profiles, and layer management. It is designed to simplify symmetrical drafting operations by providing an interactive dialog for user control and configuration.
multioffsetbothsideswithlayer 000

Command:

Command: c:MultiOffsetBothSidesWithLayer This command allows the user to select multiple line objects, define offset distances (left and right), optionally delete the originals, and choose a target layer for the resulting offset lines.

Description:

When executed, the program: • Prompts the user to select one or more LINE entities in the drawing. • Opens a DCL dialog box to configure offset distances and additional settings. • Provides a list of predefined profiles (e.g. “Schutzrohr.DN 110”, “KK Gr. II i.F_400X275”) that automatically set left/right offset values. • Allows optional toggles for:  – Deleting the original line after offsetting.  – Placing offset copies on a specific layer. • Offers a layer picker dialog that filters and lists non-XREF layers, or lets the user pick one directly from the drawing.

Helper function: (if any)​

Helper Functions Used:OL-CollectLines — Allows multi-pass selection of line entities.OL-GetAllLayers — Retrieves all non-XREF layers from the current drawing.OL-ChooseLayer — Displays the layer selection dialog with name filtering and object-based layer picking.OL-Profile-Change — Updates offset distances automatically when a profile is changed.OL-ShowMainDialog — Handles the main configuration dialog for offset settings.

Functionalities:

Main Functionalities: • Perform bi-directional offset (left and right) on multiple selected lines. • Apply predefined offset profiles or set custom offset distances.Delete originals after offset creation (optional).Change the entity layer to a selected target before offsetting (optional). • Maintain proper layer inheritance for new offset lines. • Use of ActiveX and(vl-load-com) to manage AutoCAD objects dynamically. • Temporary DCL files created with (vl-filename-mktemp) are auto-deleted after dialog use.

Result:

Result: The command creates new offset lines on both sides of the originals based on chosen distances or profiles. If enabled, it deletes the original entities and places the new offsets on the selected layer. The result is a streamlined process for creating symmetrical, layered linework — ideal for drafting conduits, ducts, or structural outlines in AutoCAD.

Images, animations etc.

multioffsetbothsideswithlayer 000
multioffsetbothsideswithlayer 001
multioffsetbothsideswithlayer 002
multioffsetbothsideswithlayer 003
multioffsetbothsideswithlayer 004
Pixel

Additional info:

Share this page:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Tags: Layers, Polyline
0
Would love your thoughts, please comment.x
()
x