3D_PolyOffset
- Saves current system variables (OSMODE, PLINETYPE, VIEWDIR).
- Switches to World UCS and disables object snaps.
- Extracts all vertex coordinates from the selected 3D polyline.
- Generates a temporary 2D polyline using XY coordinates only (Z set to 0).
- Offsets the temporary 2D polyline by a specified distance.
- Reads offset vertex coordinates.
- Creates a new 3D polyline by combining offset XY values with original Z values.
- Deletes temporary 2D polylines.
- Restores original system settings.

UnReloadDetachSelectedXrefs_01
Description This lisp scans the current drawing for xref definitions and displays them in a multi-column dialog (Name, Type, Units, Layer) with synchronized selection across columns. It allows users to apply batch xref operations, change xref attachment type, and save or load xref lists for repeatable setups across drawings. Predefined folder behavior The Save List and Load List file dialogs can start in a predefined folder chosen from a scrolling list. The predefined folder root is the user OneDrive location and the selected entry appends a relative path such as \Work\Project_01\_extra\Xref_Load_List. The predefined folder options are: None, Project_01, Project_02, Project_03, Project_04, Project_05.
UnReloadDetachSelectedXrefs_00
Description:- Core concept: The tool treats the Xref setup as a reusable “profile” stored in a text list file and re-applies it deterministically.
- Displayed data: Xref Name, Type (Attached/Overlay), Units (abbrev), Layer, and resolved Found At path preview for the active row.
- Safety behavior: “ALL” operations are wrapped so the user’s UCS and view are restored after execution, preventing unwanted zoom/UCS side-effects.
- Deterministic load workflow: When applying a list, each xref is processed one-at-a-time with a fixed UCS/units sequence to avoid scaling mismatches.
CopySelection
The user selects an LWPolyline and then two points projected onto its geometry to define the segment to duplicate. A dialog appears allowing layer filtering, picking from a list, or selecting an object in the drawing to adopt its layer. The code calculates curve parameters between the two points, reconstructs only that portion with widths and bulges, and creates a new LWPolyline on the chosen layer.
CopySelection_vs.01
• Polyline and points: After you choose an LWPOLYLINE, the routine asks for two points along it, snaps them to the closest points on the curve, and ensures they are not identical before continuing. • Segment extraction: Uses curve parameters at the two picked locations to slice the source polyline between those parameters, reconstructing a new vertex list that represents only the chosen segment (including bulges and widths). • Header cloning: Copies the original polyline’s non vertex DXF data, forces the new polyline onto the chosen target layer, and clears the closed flag so the result is an open segment. • Layer dialog: Builds a temporary DCL file that provides a text filter for layer names, a popup list of matching layers, a button to pick a layer from an existing object, and a toggle to enable or disable Extra transform options. • Layer filtering and pick: Collects all non xref layers, sorts them, filters them dynamically as you type in the filter box, and lets you optionally pick an entity in the drawing to adopt its layer as the target. • Extra options group: When Extra is enabled, the dialog exposes rotation start or end toggle, rotation angle, perpendicular distance, offset style presets, numeric offset, offset copy count, and numeric extension at start and end. • Extension at ends: The extend-ends helper extends the first and last segments of the new polyline by independent distances extS and extE along their segment directions, updating coordinates through COM. • Rotation and distance: Computes a unit direction from the first pick to the second, then rotates the new polyline around the chosen base point (start or end) by the given angle, and moves it perpendicular to that direction by the specified distance. • Offset copies: Creates additional parallel copies of the transformed polyline, spaced by the offset distance along the normal direction, up to the specified offset count; the offset value can be auto filled from presets like DN110, KK I to KK IV. • Persistent settings: Stores the last used layer and filter string in environment variables so that the next run of the command remembers which layer and filter you used previously. • Apply and Undo loop: Wraps operations in a global UNDO group, marks the undo stack before each Apply, and supports stepping back one Apply at a time when you press Undo, without closing the dialog. • Finalization logic: If you never used Apply or Undo, pressing OK performs a single geometry creation using current dialog values; if you cancel, all Apply actions in this session are undone before closing the group.
CreatesXrefsLayersAssign_01
Main Purpose- Scans the drawing and lists all XREF block definitions found in the Blocks table.
- Displays three synchronized columns: Xref, Current Layer, and Target Layer (built from the Layer Prefix).
- Provides two assignment modes: per-XREF target assignment and assign one layer to all XREFs via a filtered layer selector.
- Includes ZoomXref to zoom the view to the selected XREF inserts bounding box in Model Space using ActiveX ZoomWindow.
- Option 1: Choose an existing layer from the filtered list and click Assign Layer to all Xrefs.
- Option 2: Set Layer Prefix, then use Create Layers, Assign Inserts, or Create + Assign for per-XREF management.
- Use ZoomXref to zoom to the first selected XREF in the list.
- Press OK or Close to exit (no extra actions on OK).

XRefs2Layers
- Dialog driven selection: A temporary DCL file is generated and loaded to display two radio-button options.
- State persistence: The last selected radio key is stored in *XRefs2Layers-last-option* (default rb01).
- Execution: On OK, the chosen option is resolved to rb01 or rb02, saved, and the corresponding command is executed.
- Cancel behavior: If the dialog is canceled, the routine exits with Command canceled.

XrefDrawingOrder
- • Builds a temporary DCL dialog titled Arrange XREFs (Top → Bottom) showing the current XREF list and controls to reorder it.
- • Uses the ordered list to apply draw order changes so each XREF is moved under the one above it, producing the requested Top to Bottom stacking.
- • Stores the most recently applied order inside the current drawing using the Named Objects Dictionary so it can be recalled with Last.
- • Supports disk-based Saved Orders with Save, Load, Rename, Delete, and Clear All operations.
- • Rename behavior: pick an existing saved order in the dropdown, type a new name, click Rename. If the target name already exists, it is overwritten.

ZoomXref
What it does- • Collect Xrefs: Scans BlockTableRecords where IsXref is true and builds a list of items (Name, Units, Layer summary).
- • Dialog UI: Shows three synchronized list boxes: Xref names, Units, and Layer (read-only display columns).
- • Live filter: Filter edit box accepts * and ?, case-insensitive; list updates on every change, plus Filter and Clear buttons.
- • Layer summary: Reads layer of Model Space inserts for the Xref name; returns the layer name, Multiple if mixed, or — if none exist.
- • Zoom behavior: Selects all Model Space inserts of the chosen Xref, merges their bounding boxes, then calls ActiveX ZoomWindow using LL and UR points (no padding).
Multiple_text_mtext_2
• Text collection: Builds an internal list of the text strings from all selected TEXT and MTEXT entities in the selection set. • Underline conversion: Scans each string for “%%U” underline markers and replaces them with MTEXT underline codes using L and l so underlining is preserved correctly. • Paragraph handling: For plain TEXT entities, prefixes each string with P so every original DText line becomes its own paragraph inside the final MTEXT. • Concatenation: Concatenates all processed strings into one combined MTEXT content string in selection order. • Placement: Creates a new MTEXT object at the insertion point of the first selected entity, using its text width to define the wrapping width. • Property transfer: Copies key visual properties from the first entity to the new MTEXT such as Layer, Color, StyleName, and Height, as well as alignment and rotation. • Cleanup: After successfully creating the new MTEXT, deletes all original TEXT and MTEXT entities that were part of the selection. • No selection case: If no valid text objects are selected, prints a short message instead of doing any changes.
Copy_to_Clipboard
• Dialog Selection: Opens a DCL window where the user chooses one of two export modes for clipboard text. • Interactive Workflow: The last selected radio button option is remembered and pre-selected on the next run. • Text Extraction: Reads content from TEXT, MTEXT, DIMENSION, MULTILEADER, ATTRIB, ATTDEF, and blocks with attributes. • Formatting Cleanup: Removes U+ codes, inline MTEXT formatting, paragraph markers, and replaces them with clean characters. • Clipboard Output: Automatically transfers the cleaned text directly into the Windows clipboard via HTMLfile COM object.Lower
• Selection: Prompts the user to select TEXT and MTEXT entities to be modified. • Case Option: Lets the user choose between converting to Upper or Lower case, with Upper as the default when Enter is pressed. • Processing: Reads each entity’s text content, converts it, and writes the new value back to the entity. • System Handling: Temporarily disables command echo and precision settings, restoring them afterward. • Failure Handling: Warns the user if no valid text entities are detected in the selection.Upper
This routine prompts the user to select TEXT and MTEXT entities, then reads every entity’s text content, converts it to uppercase using STRCASE, and rewrites the modified string back into the entity automatically.Region2Polyline
The routine collects all REGION entities and processes them one by one by exploding each REGION into its primitive components — lines and arcs. It reorders these exploded segments so that they form a continuous closed loop, maintaining correct sequencing and connectivity between endpoints. For ARCs, it computes the corresponding bulge value using the arc’s total angle, allowing reconstruction of the curvature when converting back to LWPOLYLINE format. After ordering segments, it builds a new closed LWPOLYLINE from the reconstructed point list, applies bulges where needed, restores the elevation and normal vector, and then deletes the original REGION geometry.
Slope_01
What this command does: Opens a “Slope Label” dialog where you define label style (slope format, angle format, text size, horizontal/vertical scale, prefixes/suffixes, units). After confirming, you choose between two workflows: • 2 Points mode: Repeatedly pick point pairs; each pair gets a slope (and optional angle) MTEXT label at the midpoint, offset above/below the segment. • Select Line/Segment mode: Select one or many LINE/LWPOLYLINE/POLYLINE entities; every individual segment gets a label.
PrefixSuffixRound
The routine provides a DCL-based interface where you can choose between three actions: Prefix, Suffix, or Digits (rounding). Depending on the row selected, you can specify Add and Remove templates for prefix or suffix, or a number of digits for rounding numeric text. Prefix and Suffix operations support both fixed strings and wildcard templates that can capture parts of the original text and reinsert them using “*” and “?” placeholders, while the Remove side can strip matching patterns or wildcards from the beginning or end. The rounding option scans text content and converts numeric-only strings to rounded values with the specified number of decimal digits, leaving nonnumeric text unchanged. All operations can be reused without reopening the dialog by calling the PREF, SUFF, or OKR_TXT helper commands that rely on stored values.
Slope_Ro
This routine requests two points from the user, computes the vertical and horizontal differences, converts them into a simplified rise-over-run ratio based on a constant 12-unit run, and calculates the slope angle using arctangent mathematics. The resulting slope and angle are shown in a dialog box, allowing quick field verification without producing any entities or altering the drawing. The routine cleans up after itself by restoring BLIPMODE and CMDECHO system variables.
OffsetAndLayer
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.
Lengthen
• Initial globals: Stores two persistent extension values *DEX_extStart* and *DEX_extEnd* so the dialog remembers your last used distances between runs. • DCL creation: Dynamically writes a temporary DCL file that defines the Double Extend dialog with two edit boxes (Extend Start and Extend End) and buttons for Apply, Undo, OK and Cancel. • Dialog behavior: Each time the dialog is shown it pre fills the edit boxes from the global values and updates those globals when you press Apply or OK, converting strings to distances. • Return codes: The dialog function returns a code that distinguishes between OK, Cancel, Apply and Undo so the main routine can decide what to do without re selecting geometry. • Selection and group: The command first gathers a selection set of eligible entities, then starts an overall UNDO group so the entire session can be undone as one operation if desired. • Apply loop: When you press Apply the routine places an UNDO mark, calls the geometry engine to extend all selected entities by the current start and end values, increments an internal apply counter and regenerates the drawing. • Undo button: Pressing Undo triggers an UNDO back to the last mark, rolling back the most recent Apply, decrementing the apply counter and updating the drawing again. • OK semantics: If you have never used Apply or Undo, pressing OK performs one single extension using the current values and then exits; if you have already applied or undone changes, OK simply accepts the current state without further modification. • Cancel semantics: If you press Cancel or close the dialog without confirming, the routine repeats UNDO back as many times as there were Apply operations, fully restoring the pre command state and then ends the UNDO group. • End of session: After leaving the dialog loop the command always closes the UNDO group, making the final chosen state a single undo step from normal AutoCAD undo.MiddleLinePolylines_2
The routine takes the first and last entities from the user selection and reads their geometric start and end points through the curve API, which works for lines, polylines, arcs, splines, and ellipses. It rejects closed curves by checking that each start point is different from its corresponding end point, which prevents creating a centerline from closed loops. From these endpoints, it computes the midpoint between the two starts and the midpoint between the two ends in the XY plane, then creates a two vertex LWPOLYLINE that connects those midpoints, effectively representing a simple centerline between the two boundary curves.
InteriorPolylinesArea
This routine centralizes several processing tools into a single dialog window, allowing the user to pick one workflow for generating, cleaning, or merging interior closed areas. Each radio selection triggers one or a chain of advanced geometric operations such as breaking curves at intersections, creating offset-based inside boundaries, converting regions to polylines, removing open shapes, or unifying closed polylines into single areas. The chosen method is remembered for the user’s next session, making repeated usage faster and more consistent.CloseParalelPolylines
This routine takes exactly two valid open curve objects, forces polylines open if closed, connects their start points and end points using new LINE entities, then merges everything into one polyline using PEDIT join. System prompts are suppressed and restored afterward for clean automated processing.
BookmarkEntities
Bookmark data structure: Each bookmark is stored in*bm-list*as:(label startPt endPt colorStr handle etype remark)• label – friendly name like “TEXT”, “LWPOLYLINE (closed)”, “BLOCK MyBlock”, etc., depending on entity type. • startPt – a representative start / lower point: – Lines: start point (10). – Polylines / splines: start point fromvlax-curve-getstartpoint. – Text / blocks / circles: usually lower bound of the bounding box, fallback to insertion point. • endPt – usually upper bound of the bounding box, used to define a zoom window. • colorStr – color info as text: – If TrueColor (DXF 420) exists:"TC:<integer>". – Otherwise: ByLayer / ByBlock / ACI number. • handle – entity handle (DXF 5) used later to find the live entity withhandent. • etype – DXF type string (“TEXT”, “MTEXT”, “LINE”, “LWPOLYLINE”, “POLYLINE”, “CIRCLE”, “SPLINE”, “INSERT”). • remark – user-defined comment, stored as simple string.
Global lists & filters: •*bm-list*– the full bookmark collection for the current session/drawing. •*bm-index-map*– maps visible row index in the dialog to the real index in*bm-list*(used when group-filtering so operations affect the correct entry). •*bm-group*– current group filter: “All”, “Text”, “Lines”, “Polylines”, “Circles”, “Splines”, “Blocks”, “Other”. •*bm-groups*– complete list of group labels, always starting with “All”. Built dynamically from current bookmark content.PlusMinusNumericValue
The routine opens a compact dialog where you enter a numeric increment/decrement value and specify which numeric segment(s) in the text to modify (by position, All, or via a later List prompt). It then scans the selected annotation objects, breaks each string into alternating numeric and non-numeric chunks, and applies the requested numeric adjustment to the chosen chunk(s) only, leaving surrounding text intact. For attributes, you can choose whether to modify the Tag or the Text string; for MTEXT, it respects basic control codes so numbers are not broken by formatting sequences. All changes are grouped in a single UNDO mark and the last-used dialog values are remembered via registry for the next run.
RotateUCS
When executed, the program does the following: • Sets the UCS to World using (command “_UCS” “_W”) so the rotation always starts from a known base. • Resets the snap angle to 0 using (command “_snapang” 0) so the cursor/ortho aligns with the new UCS properly. • Prompts the user: “Specify rotation angle:” and reads the angle in radians (AutoCAD default). • Converts the angle from radians to degrees with (* angle (/ 180 pi)) because the UCS command expects degrees. • Calls (command “_UCS” “_Z” ang1) to rotate the UCS around the Z axis by the specified angle. • Prints a confirmation message like “Angle of UCS: 45.00” using (princ …) and (rtos …) for formatting. • Finally asks the user for a UCS name and, if provided, saves the UCS with (command “_UCS” “_Save” ucsname).ChangeBlockEntitiesLayer
• Block selection: Prompts the user to select only INSERT entities which represent block references in the drawing. • Reference analysis: For each selected block reference, reads its block name and its current layer name. • Definition lookup: Locates the corresponding block definition in the active document Blocks collection by using the block name. • Entity iteration: Loops through every entity that belongs to the block definition and checks whether it has a Layer property. • Layer matching: Compares each entity layer with the block reference layer and, when they differ, updates the entity to use the same layer as the reference. • Feedback: After processing all selected blocks, prints a confirmation message that entities inside the selected blocks have been updated. • No selection case: If no block references are selected, displays a notice that no block references were selected and performs no changes.
CopyBlock
• Block picking: Prompts you to pick a block reference and verifies that it is an INSERT and not on a locked layer before continuing. • Default naming: Proposes a default new block name based on the original name (Base_1, Base_2, and so on) that is guaranteed to be unique among existing blocks. • Dialog modes: The dialog offers two modes via radio buttons: “Copy Rename Block” and “Copy Rename Block + Layer”. • Name input: Allows you to type a custom new block name and validates it against existing block names and symbol name rules. • Layer tools (+Layer mode): When the “Copy Rename Block + Layer” mode is active, a layer filter box, a layer list, and a “Pick from drawing” button become active so you can choose a target layer interactively. • Delete toggle: A “Delete Initial Block” toggle (default on) controls whether the original reference is deleted after the new, renamed copy is created and retargeted. • Definition cloning: Uses ObjectDBX to copy the original block definition to a temporary database, rename it there, and copy the renamed definition back into the active drawing as a new block. • Reference handling: Keeps a handle to the original reference, and in copy mode creates a duplicate reference, then repoints the active (possibly copied) reference to the newly created block definition. • Layer enforcement (+Layer mode): If a layer is chosen, sets the new block reference to that layer and optionally forces all geometry inside the new block definition to that layer and ByLayer properties. • Original cleanup: If the “Delete Initial Block” option is enabled, the original reference is deleted, leaving only the new renamed (and possibly re-layered) reference in place. • Error and cancel: Handles invalid names, ObjectDBX failures, and user cancellation with informative messages and clean exit.
Exp_Imp_NamedViews
• Global state: Stores the last mode (*EINVU_Project_02st_option* = Export / Import), last chosen predefined index (*EINVU_predef_idx*), resolved predefined paths (*EINVU_predef_values*), and fixed LSP folder/file paths (*NVU_fixed_folder*, *NVU_fixed_file*). • Predefined folders: Uses NV-build-predefs to probe OneDrive roots and auto-resolve project-specific..._extraNamed_Viewsfolders for multiple projects (Project_01..Project_04). These become entries in the Predefined folder popup. • Fixed folder + file: A constant base folder (*NVU_fixed_folder*) holds a centralExp_Imp_NamedViews.lspfile, which the UI can open in Notepad++ or reload into AutoCAD directly. • Export/Import mode selection: The main dialog offers two radio buttons: Export NamedViews (rb01) and Import NamedViews (rb02). The selected option is persisted in *EINVU_Project_02st_option* and used by c:ExpImpNVU to decide which operation to dispatch. • Predefined folder popup: A popup list (predef) displays human-readable labels (e.g. “Project_01 Named_Views”) backed by the resolved paths in *EINVU_predef_values*. The chosen index and corresponding directory are stored in *EINVU_predef_idx* and *EINVU_predef_dir*. • ViewsIO coordination: The code writes the chosen import folder into the registry under HKEY_CURRENT_USERSoftwareJTBWorldviewsIOProject_02stFolder, which the separate viewsIO tool reads when running its own GUI Import/Export. • Export file structure: ExportViews iterates all table VIEW entries and, when present, their linked VISUALSTYLE (code 348). Each VISUALSTYLE is exported only once as a clean DXF list with handle/owner/link codes removed, followed by a cleaned VIEW entity that omits handle, owner, and 348 references. These are written one entity-per-line usingprin1format. • Import file structure: ImportViews reads back each line, reconstructs VISUALSTYLE entries into the ACAD_VISUALSTYLE dictionary, fixes owner references, then inserts the VIEW entries, reattaching their 348 link to the newly created VISUALSTYLE so they’re fully functional again. • Folder persistence: The helper save-persisted-folder writes the last used folder to the registry; get-persisted-folder reads it back. Export/Import defaults prefer DWG folder, then persisted folder, then fall back toC:Temp. • Help dialog: A secondary dialog (NV_HelpDlg) shows a multi-line textual reference listing start folder resolution rules, commands, operations, and predefined folders. It supports copying selected lines, all lines, or the resolved path to clipboard, and toggling Unicode mode to include or strip non-ASCII characters. • Clipboard integration: The help-related functions implement both acmd.exe | cliptext-file based copy and a COM-based htmlfile → ParentWindow → clipboardData route, giving robust text copy into Windows clipboard from inside AutoCAD.
NamedViewList
The routine collects all named views from the current drawing, sorts them case-insensitively, and displays them in a list box with live filtering and optional case-sensitive matching. The user can select one or more views, zoom to a selected view without closing the dialog, delete one or several views in-place, or accept the selection with OK to restore multiple views sequentially after the dialog closes. It uses a temporary DCL file written on the fly, portable string and list helpers (no reliance on external libraries), and cleans up the dialog and temp file on exit or error.
ToolbarManager
• Global session state: Maintains internal lists *tbm-all*, *tbm-view*, the current filter text *tbm-filter*, the visible only toggle *tbm-visonly*, the active group *tbm-group*, and the group list *tbm-groups* so your choices persist while the drawing is open. • Toolbar collection: On each run, the command queries all menu groups from the Acad object, scans each group’s toolbars, and builds a master list of items in the form (label object visible? group). • Label format: Each toolbar label combines the menu group and toolbar name as “Group – ToolbarName” so you can distinguish toolbars with identical names in different groups. • Sorting: The combined toolbar list is sorted first by group name and then by label, giving you a stable and predictable order inside the list box. • Group list building: Extracts the unique group names from the toolbar list and stores them in *tbm-groups*, always inserting “All” as the first option to show toolbars from every group. • DCL dialog creation: Writes a temporary DCL file defining the Toolbar Manager dialog with a filter edit box, group popup, Visible only toggle, multi select list box, and buttons for Select all, Clear filter, Apply, OK, and Cancel. • Initial UI state: The dialog tiles are initialized from the saved global values so your last used filter text, visible only flag, and selected group are restored when you reopen the manager. • View list refresh: Whenever filter, group, or visible only options change, the routine rebuilds *tbm-view* with matching indices from *tbm-all* and repopulates the list box with just those toolbars. • Preselection of visible: After repopulating the list, the code automatically selects entries corresponding to toolbars that are currently visible so you can see your active setup at a glance. • Apply behavior: When you press Apply or OK, the code reads the current list selection and turns on visibility for those toolbars in the current view, setting all other toolbars in the view to hidden. • Visibility update scope: Only the toolbars that match the current filter and group (the current view) are modified; toolbars outside that view keep their existing visibility state. • Filter clearing: The Clear button resets the filter text, updates the filter tile, and refreshes the view so that all toolbars in the chosen group are shown again in the list. • Dialog exit: OK applies the current selection and closes the dialog, Apply updates toolbars but leaves the dialog open, and Cancel closes the dialog without applying any further changes after the last apply.
TotalLengthAreaDetailed_vs_01
What it does • Dialog choice Lets you choose between Length or Area, set Excel related options, and define decimal precision. • Entity selection Prompts you to select relevant entities, then sums their geometric length or area depending on the chosen mode. • Expression building Builds a term by term expression like v1+v2+v3 using the chosen decimal precision. • Excel output Converts the expression to =expression or =ceiling(expression,5) according to the selected Excel options and copies it to the clipboard. • MText creation If enabled, asks for an insertion point and creates MText in the current UCS reading either just the single value or the full expression with its total.
DB_Planung_Gelände
• Defaults and globals: Initializes default mode, reference level, drawing scale, offsets for Planum and Gelaende labels, layer names, text styles, text height, and flags for which fields can be edited or which style popups are enabled. • Help file mapping: Stores file names for help images and a sample DWG, and resolves them via support paths, LSP folder, and DWG folder so that context sensitive Help buttons can open the correct reference graphics. • Dialog writer: Dynamically writes a DCL file defining the “Planung / Gelaende” dialog with radio buttons for mode, parameter edit boxes, offset toggles, Planum and Gelaende layer and style popups, text height control, and bottom buttons for Notepad plus plus, Explorer, and help DWG. • Parameter editing: The dialog allows editing of reference level, drawing scale, four offsets (Planum distance and elevation, Gelaende distance and elevation), and main text height, with edit toggles that gray or enable individual numeric fields. • Layer and style selection: Builds sorted lists of all drawing layers and text styles, merges them with pre defined defaults, and exposes them as popup lists for Planum and Gelaende line, distance, and elevation layers and styles, with separate enable or disable radio controls per group. • INI persistence: Reads and writes an INI file in the drawing folder (ScTrMoss.ini), storing mode, numeric parameters, layer and style selections, edit toggles, and enable style flags so the dialog remembers the previous configuration between sessions. • Planum drawing routine: The C:DB_Planum command asks for the intersection point between center line and band, finds cartridge and profile reference lines, sets up temporary layers for visual guidance, then repeatedly asks for quotation points and places leader lines plus Planum distance and elevation texts using Planum offsets and layers. • Gelaende drawing routine: The C:DB_Gelaende command performs a similar workflow but uses the Gelaende offsets, layers, and styles, placing ground profile distance and elevation texts relative to the same reference point and band geometry. • Numeric calculations: For each picked quotation point it computes the horizontal distance and vertical delta from the intersection point, scales them by drawing scale, adds the reference level to vertical difference to get elevation, and formats both values as text with configured precision. • System state management: Both Planum and Gelaende routines store and restore osmode, clayer, ucsview, dimzin, expert settings, and view “orig” state, optionally wrap operations in an undo group, and clean up temporary color changes to guiding layers. • Launcher flow: The DB_P_G launcher runs the dialog, processes the user choice and settings, writes the INI if accepted, then calls either Planum or Gelaende routine; on cancel it prints a simple cancel message and exits cleanly.
FixLineTextOverlap
• Line spacing setup: Line_Overlap starts by taking the current text size, multiplies it to get a default spacing, and lets you override this value once for the session. • Vertical line selection: Prompts you to select LINE entities that should be treated as vertical reference lines; if none are selected the routine aborts with a message. • Crank point: Asks you to pick a crank point which defines the Y level used to bend each vertical line into a crank shaped LWPOLYLINE, and stores this point as *lastPick* for the text routine. • Line re geometry: For each selected line it sorts endpoints by height, deletes the original LINE, and builds an LWPOLYLINE path that goes from the top, down to the band Y, then over to the new X, and finally down to the lower Y value. • X distribution: Collects the X coordinates of the lines, sorts them, and calls ++rarify so that new X positions are at least the requested spacing apart, preventing crank segments from overlapping. • Text grouping: Text_Overlap reads all selected TEXT and MTEXT objects, determines their insertion points in world coordinates, and builds small records containing entity, type, side, and insertion point. • Row detection: Groups the text records into Y based rows where items are within a small vertical tolerance of one another so only texts that could clash in the same band are processed together. • Side separation: For each row it divides items into left and right lists relative to the vertical rail X, then designates an anchor text on each side as the closest to the rail. • Horizontal spacing: Keeps each anchor in place and shifts remaining texts on that side by integer multiples of the spacing distance away from the rail, left side negative direction, right side positive direction. • Coordinate writing: Writes new insertion points back to the entities, using code 10 or 11 for TEXT depending on alignment and code 10 for MTEXT, and regenerates them so the new layout is visible immediately. • Undo protection: Line_Overlap opens an UNDO group before changes and closes it at the end or on error so all crank line edits can be undone in a single step if needed.
SetUpUnits
When executed, the program: • Creates a temporary DCL file in the AutoCAD temp folder named settupunits.dcl and defines the dialog layout in it (country list, zone list, scale list, angle list, units list). • Displays the dialog and populates the Country/Region popup with values taken from an internal zone database (a large list of LL / national / regional coordinate systems included in the .lsp). • When the user picks a country, the Coordinate System popup is updated to show only the zones for that selected country. • The user can also pick a Drawing Scale from a list of scales (1:100, 1:200, etc.), which the code internally converts into the Civil 3D drawing scale value. • The user can pick Angular Units (Degrees, Radians, Grads) and Drawing Units (Meters, Millimeters, Centimeters, Decimeters, Inches). • After pressing OK, the dialog is closed, the temporary DCL file is deleted, and the chosen settings are applied to the current Civil 3D drawing.MleaderStraight
- Displays a small DCL dialog to choose processing scope: select MLeaders interactively or process all MLeaders in the current space.
- Detects whether you are in ModelSpace or PaperSpace and uses the corresponding VLA space object for temporary geometry and updates.
- For each MLeader, reads leader vertices, computes an orthogonal alignment reference through the end point, then resets the leader line vertices to straighten/perpendicularly align the leader segment.
- Regenerates viewports and reports how many MultiLeaders were processed.

CubeDisplay_Off_On
When executed, the program performs the following actions: • Loads the COM interface using (vl-load-com) to access the AutoCAD ActiveX API. • Retrieves the active drawing document object using (vla-get-activedocument (vlax-get-acad-object)). • Sends the AutoCAD command NAVVCUBEDISPLAY 1 to temporarily disable the Navigation Cube. • Immediately sends NAVVCUBEDISPLAY 3 to re-enable and refresh the cube display, ensuring it becomes visible and properly updated. • Finishes silently using (princ) to avoid leaving residual command line messages.
Export Import Custom MS_UCS
When executed, the toolset does the following: • Defines fixed locations: a base folder and a fixed .lsp file path (under OneDrive) that the dialog buttons can open in Explorer or Notepad++. • Builds and keeps global state: last chosen option (export/import), last used directory, currently selected predefined folder, whether Unicode copy is on, etc. • Creates a DCL dialog on the fly (no external .dcl shipped) with: – radio buttons: “Export UCS” / “Import UCS” – a popup list of predefined folders (Project_001_UCS, Project_002_UCS, …) – quick buttons: Explorer / Notepad++ / Reload / Help • Resolves OneDrive roots dynamically using registry and environment variables so the same code works on different machines/tenants — then builds real, existing folders for predefined UCS export locations. • The Help dialog is a second DCL: it shows a list of generated help lines, current Unicode state, and has buttons to copy selected/all lines to clipboard, copy the active folder path, toggle Unicode, or open the LSP folder. • Clipboard copy is done using Windows tools (`cmd | clip`) or using an htmlfile COM trick so user doesn’t need PowerShell and the dialog can stay open. • Export reads every UCS from the DWG table, reconstructs the 3-point definition, and writes it as `name;P1;P2;P3` to a `.ucs` file. • Import reads each such line, validates points, and creates/updates the UCS in the current drawing — first with a command-based approach, and later in the file with a COM-only, freeze-safe importer that directly edits the UCS collection.
MLeaderWidthFix
- Selects a set of TEXT, MTEXT, and MULTILEADER entities from the current selection context.
- Calculates a “default” width by averaging widths measured across the selected objects (TEXT extents, MTEXT bounding box width, and MLeader TextWidth when it is MTEXT-based).
- Prompts the user for a new width, showing the computed average as the default value.
- Applies the new width to MTEXT objects via Width and to MTEXT-content MLeaders via TextWidth (ContentType = 2).
- For TEXT (DText), reports that width is not directly settable and skips modification.
Text2Multileader_01
Description- Prompts the user to select one or more TEXT or MTEXT entities and extracts their content.
- Sorts the selected text objects by insertion point Y coordinate to build a readable top-to-bottom string sequence.
- Concatenates all text strings into a single note, separated by spaces, then trims the final trailing space.
- Computes a target text width as the maximum bounding-box width among the selected text objects.
- Prompts the user to select a LINE or POLYLINE to define the leader start and end points.
- Creates a MLEADER using the extracted points and assigns the concatenated text and computed width to the new leader.
- If the leader creation succeeds, deletes the selected line or polyline and deletes the original text entities.
Text2Multileader_00
- Selects all objects matching *TEXT (TEXT and MTEXT).
- Builds a combined text string by extracting each object’s TextString, appending a space, and sorting the items by insertion point so the final text follows a top-to-bottom Y order.
- Computes a target MLeader text width as the maximum bounding-box width among the selected objects.
- Prompts for arrowhead and landing points, runs the MLEADER command to create the leader, then sets the new leader’s TextString and TextWidth to the calculated values.
- Deletes the original selected text objects once their content has been captured.

Change Background Color
When executed, the program: • Step 1 Loads AutoCAD’s display and drafting preferences and builds a list of predefined gray/black/white color options. • Step 2 Displays a dialog with a dropdown list of color presets and toggles for Model and Paper space. • Step 3 Applies the selected color to the chosen workspace(s), adjusting crosshair, tracking, and snap marker colors for contrast. • Step 4 If Cancel is pressed, restores the previous colors using a saved snapshot.
Hide / Show Objects
When executed, the program: • Step 1 Writes a temporary DCL file defining a simple dialog with three radio buttons and OK/Cancel controls. • Step 2 Opens the dialog and preselects the last used option (default “Isolate the selected”). • Step 3 Captures which option the user selects and runs the matching visibility function: – “Isolate the selected” → hides everything else. – “Hide selected” → hides only the chosen objects. – “Display all” → shows every hidden object again. • Step 4 Redraws the view after the visibility change. • Step 5 Restores the previous choice as default for next run.
SteSysVar
When executed, the program: It builds a tabbed dialog with seven sections grouping related AutoCAD system variables. Each variable appears as a dropdown showing its possible values and human-readable meanings. 🔹 File Tab • FILEDIA (preset → 1) 1 . Enable dialog box 0 . Suppress dialog box • PROXYGRAPHICS (preset → 1) 1 . Save proxy graphics 0 . Do not save • CMDECHO (preset → 0) 0 . No echo to command line 1 . Echo command input/output 🔹 Dialogs Tab • HPDLGMODE (preset → 1) 1 . Enable hatch dialog 0 . Disable hatch dialog (command-line mode) 🔹 Drawing Behavior Tab • ORTHOMODE (preset → 1) 1 . Ortho ON 0 . Ortho OFF • MIRRTEXT (preset → 0) 0 . Keep text readable (do not mirror) 1 . Mirror text objects • REGENMODE (preset → 0) 0 . Automatic REGEN off 1 . Automatic REGEN on • PEDITACCEPT (preset → 1) 1 . Always convert lines to polylines 0 . Prompt before converting • TRIMEXTENDMODE (preset → 0) 0 . Quick mode off 1 . Quick mode on • PLINEWID (preset → 0) 0 . Default width = 0 • DIMASSOC (preset → 2) 2 . Associative dimensions 1 . Non-associative 0 . Exploded • DRAGMODE (preset → 2) 2 . Auto (automatic preview) 1 . On (always drag) 0 . Off (no preview) • MBUTTONPAN (preset → 1) 1 . Middle mouse button = Pan 0 . Middle button opens menu • WIPEOUTFRAME (preset → 0) 0 . No display/no plot 2 . Display only (no plot) 1 . Display and plot frame 🔹 Selection Tab • PICKFIRST (preset → 1) 1 . Preselect enabled 0 . Preselect disabled • PICKADD (preset → 2) 2 . Add mode (re-click removes) 1 . Add mode (Shift removes) 0 . Single selection only • PICKBOX (preset → 3) 3 . Standard pickbox size • GRIPOBJLIMIT (preset → 0) 0 . Unlimited grip display • SELECTIONPREVIEW (preset → 3) 3 . Preview when idle and active 2 . Preview when command active 1 . Preview when idle 0 . No preview • SELECTIONCYCLING (preset → 2) 2 . On (dialog appears) 1 . On (no dialog) 0 . Off • HIGHLIGHT (preset → 1) 1 . Highlight ON 0 . Highlight OFF • PICKDRAG (preset → 0) 0 . Normal window selection 1 . Press-drag toggle mode 🔹 Drafting Aids Tab • OSMODE (preset → 16383) 16383 . All common object snaps 16384 . Suppress running snaps 1 . Endpoint 2 . Midpoint 4 . Center 8 . Node 16 . Quadrant 32 . Intersection 64 . Insertion 128 . Perpendicular 256 . Tangent 512 . Nearest 1024 . Geometric Center 2048 . Apparent Intersection 4096 . Extension 8192 . Parallel • OTRACK (preset → 1) 1 . Object Snap Tracking ON 0 . OFF • AUTOSNAP (preset → 17) 17 . Marker + Tooltip 1 . Marker 2 . Magnet 4 . Tooltip 8 . Aperture box 16 . Object Snap tooltip 32 . Cursor badge 0 . Off • DYNMODE (preset → 3) 3 . Show dynamic input in both states 2 . Show when idle 1 . During commands 4 . Dimension input 0 . Off • UCSFOLLOW (preset → 0) 0 . View unchanged 1 . View follows UCS changes • ZOOMFACTOR (preset → 30) 30 . Default mouse wheel zoom step • DONUTID (preset → 0) 0 . Default inner diameter • DONUTOD (preset → 1) 1 . Default outer diameter 🔹 Xrefs Tab • XREFOVERRIDE (preset → 0) 0 . Disable xref layer overrides 1 . Enable xref layer overrides 🔹 Publish Tab • PUBLISHCOLLATE (preset → 1) 1 . Collate — publish sheets in order 0 . Do not collate — publish separately Each dropdown reflects these values, with the top entry being the preset (default). Selections persist across tabs until OK or Cancel.
ChangeLayer
- Opens a temporary DCL dialog titled Select Layer with a filter edit box and a single-select list of layers.
- Builds the layer list from the drawing’s layer table, including only layers that are not Off and not Frozen, then sorts them alphabetically.
- Allows filtering the list using wildcard patterns (* and ?) and updates the list live as the filter changes.
- Provides a Pick Layer from Drawing button that lets the user select an object and automatically uses that object’s layer as the filter pattern, then reopens the dialog.
- On OK, returns the chosen layer name; the command then sets CLAYER to that layer and prints confirmation; on cancel, prints a cancel message.

ChangeLayerToSelected
- Reads the last used layer and last filter from environment variables ChangeLayer_LastLayer and ChangeLayer_LastFilter to initialize the dialog state.
- Builds a sorted list of all drawing layers excluding Xref layers (names matching *|*).
- Creates a temporary DCL dialog with a filter edit box, a popup list of matching layers, and a button to pick a layer from an object in the drawing.
- When the user clicks OK, stores the chosen layer and filter back to the environment, then proceeds to object selection and changes those objects to the chosen layer via CHPROP.
- If the user clicks Pick Layer From Drawing, the routine prompts for an object, captures its layer, and reopens the dialog with that layer preselected (while retaining the last filter text).

DeleteLayerByFilter
- Provides a single-file LISP with an embedded DCL dialog titled Delete Layers by Filter to find and delete multiple layers at once.
- Builds a list of candidate layers from the drawing, excluding Xref-dependent layers (names matching *|*) and excluding reserved layers 0 and DEFPOINTS.
- Supports filtering by wildcard (*, ?) or by plain text (auto-wrapped as *text*), and allows multi-select in the list box.
- Deletes selected layers primarily through Express Tools -LAYDEL using a scripted command sequence; if unavailable or unsuccessful, falls back to attempting a VLA delete as a last resort.
- Includes an additional command that deletes layers from a user-defined list variable LAYLIST using the same deletion pipeline and reporting.

DuplicateToSelectedLayer
- Prompts the user to select entities to duplicate (any multi-selection method), then opens a DCL dialog to choose the target layer from a list of non-Xref layers.
- Defaults the layer selection to the last used target layer stored in DuplicateToLayer_LastLayer when it exists in the current drawing.
- On OK, temporarily switches CLAYER to the target layer, runs COPY with a base point of 0,0 and a displacement of 0,0 (duplicate-in-place), then captures the newly created entities via ssget "_P".
- Applies the target layer to the copied entities using CHPROP, brings them to the front using DRAWORDER, sets them as the current selection, and restores the original current layer.
DuplicateToNewLayer
- DUPLICATELAYER: prompts the user to select an object, reads that object’s layer, then opens a dialog to enter a new layer name (default Copy_of_<layer>) and optionally assign the selected object to the new layer.
- If the target layer name does not already exist, creates it by copying properties from the source layer; if it exists, reuses it.
- Sets the new (or existing) layer as current (CLAYER), and if the checkbox is enabled, modifies the selected entity to the new layer and updates it.
- DUPLICATELAYERCURRENT: duplicates the current layer in the same way (default Copy_of_<current>) and sets the new layer current; the checkbox is displayed by the shared dialog but not used for reassignment in this command.

FreezeLayersInMS
- Opens a DCL dialog titled Freeze/Control Layers (Model Space) with a main layer filter, scope toggles (Current, Xref, Both), an Xref filter + Xref multi-select list, and a “Matching layers” multi-select list with status columns.
- Builds the matching layer list by evaluating both name filter criteria and scope criteria (current layers vs xref layers, optionally limited to selected xrefs).
- Displays each matching layer as a fixed-width column line showing source (C/X), name (Xref prefix removed for display), On/Freeze/Lock/Plot state, color, and linetype.
- Applies batch operations (Freeze/Unfreeze, Off/On, Lock/Unlock, Plot/NoPlot) to the selected layers using VLA property setters on the true layer names.
- Saves filter and toggle state (and selected xrefs) to environment variables on close, then deletes the temporary DCL file.

LayerCreation
- LayerCreation is a layer creation/update tool that supports ACI colors, RGB truecolor, and Color Book colors through the AutoCAD color dialogs, and can optionally set the new layer as current.
- When DCL is available, it generates a temporary dialog to capture layer properties and default settings; if the DCL core is not usable, it automatically falls back to a command-line workflow (NEWLAYERCLI).
- The routine creates the layer if missing, sets Linetype, Lineweight, and Transparency via scripted -LAYER calls, then applies the selected color via the layer’s TrueColor object (supports book colors and RGB).
- Finally, it applies drawing defaults for newly created objects (CELTSCALE, CETRANSPARENCY, THICKNESS) and optionally sets CLAYER to the created/updated layer based on the toggle.

MultiOffsetBothSidesWithLayer
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.
PurgeUnusedLayers
- Creates a single file workflow by embedding a DCL definition inside the LISP and writing it to the temp folder at runtime.
- Loads the dialog, scans all layers, identifies unused layers, then lets you purge selected layers or purge all unused layers.
- Always prevents deletion of layer 0, layer DEFPOINTS, and the current layer.

RenameLayer
- Opens a temporary DCL dialog Layer Rename (Case Sensitive) that lets the user: filter layers by a substring, add prefix/suffix, remove a substring, replace one string with another, apply ALL CAPS, and optionally auto-merge layers after a “Remove”.
- After the dialog closes with OK, gathers all layer names from the layer table, filters them by the search string (or includes all if search is blank), and excludes layer 0.
- For each matching layer, computes a new name by applying Remove, Replace, Prefix, and Suffix in sequence, then renames the layer via -RENAME; if the Merge toggle is enabled and the target name already exists, it merges layers using -LAYMRG instead of a straight rename.
- Shows a progress indicator during processing, cleans up the temporary DCL file, restores CMDECHO, and closes the Undo mark at the end (or on error/cancel).

Zoom2Layer
- Builds a list of layers that are visible and unfrozen, then shows a temporary DCL popup where the user can filter and select a layer.
- The filter field supports wildcards * and ? and is restored from the environment variable CHLAY-LAST-FILTER (defaults to *).
- After a layer is selected, the command gathers all entities on that layer and computes a combined bounding rectangle, then performs a window zoom to that area.

LayersNameToClipboard
- Prompts the user to select entities, then scans the selection set and extracts each entity’s layer name (DXF group 8).
- Builds a list of unique layer names (no duplicates) in the order encountered, prints them to the command line, and concatenates them into a newline-separated string.
- Copies the resulting string (layers only) into the Windows clipboard so it can be pasted into other applications.
NCopyExtra
• Environment setup: Grabs the current AutoCAD application, active document, and layer table to manage layer creation and property copying. • Nested selection: Uses NENTSELp to let you pick objects inside xrefs or block references, capturing both the picked entity and its transform matrix. • Layer name read: Reads the original entity’s layer name (for example “_XREF|VG_KK”) from its DXF group 8 data. • Xref prefix cleanup: Detects a “|” in the layer name and trims off the xref prefix so only the local layer name remains (e.g. turns “_XREF|VG_KK” into “VG_KK”). • Entity cloning: Creates a new entity in the current space using ENTMAKEX with the original entity’s DXF data. • Transform application: Applies the nested transform matrix returned by NENTSELp so the copied entity appears in the correct location and orientation in the current space. • Layer object retrieval: Gets the full original layer object (including the xref prefix) from the layer table to read its visual properties. • Local layer ensure: Checks if the trimmed local layer already exists; if not, creates it, otherwise reuses the existing local layer object. • Property mirroring: Copies color, linetype, and lineweight from the xref layer object to the corresponding local layer, synchronizing their appearance. • Layer reassignment: Assigns the newly created entity to the trimmed local layer name so it no longer resides on an xref layer. • Loop behavior: Repeats the selection–copy–layer process for each picked object until you press Enter with no selection to end the command.
Layouts_list
- Collects layout names from the active drawing using tab order for consistent ordering, and builds a unique DCL dialog (written to a temporary file) each run.
- Applies a case-insensitive wildcard filter using wcmatch with support for * and ?, and optionally excludes or includes Model.
- Displays the filtered list in a multi-select list box, maintains selection by name when rebuilding the list, and keeps a live Selected counter.
- On Copy to Clipboard, formats the selected layout names with CRLF line breaks and copies them to Windows clipboard using an MSHTML clipboard method with PowerShell and clip.exe fallbacks.
- Closes cleanly by unloading the dialog and deleting the temporary DCL file after use or on error.

LayoutNum
- Builds a unique DCL dialog definition at runtime and lists layouts with a wildcard filter, optionally including Model in the list as a non-renamable entry.
- Allows selecting multiple layouts, choosing ordering by tab order or alphabetical, and defining rename parameters: starting number, width (zero-padding), prefix, suffix, and optional auto-resolve for name conflicts.
- Displays a preview list showing Old => New names before applying changes; preview refreshes when selection or options change.
- Applies renaming using ActiveX by setting each layout object name, wrapped in a safe undo mark for editor-level undo grouping, while also recording rename frames for the dialog’s own manual undo stack.
- Implements Undo inside the dialog by replaying stored rename frames in reverse to restore old names, avoiding the AutoCAD UNDO command inside DCL callbacks.
- Persists the last-used UI values (filter, numbering, prefix/suffix, order, auto-resolve, include model) so the next run starts with the prior settings.

GoToLayout
- Builds a unique temporary DCL file each run and launches a dialog titled Go To Layout with a filter edit box and a matches list.
- Reads available tabs from layoutlist and explicitly includes Model so both model and paper-space tabs can be targeted.
- Filters using case-insensitive wcmatch against the user pattern, treating an empty pattern as *, and sorts matches case-insensitively for predictable navigation.
- Provides browsing controls: selecting a list item or using < Prev and Next > updates the highlighted match, with wrap-around at the ends.
- When Preview switch while browsing is enabled, the routine switches CTAB live as the selection changes; OK finalizes the selection, Cancel restores the original tab.

FreezeLayersInVP
- Builds an embedded DCL file at runtime and displays a dialog titled Freeze Layers in Current Viewport.
- Collects all layers from the active document and optionally restricts matches to Current layers, Xref layers, or both, with an additional Xref-name selector when Xref filtering is enabled.
- Uses an accent-insensitive filter: if the filter text contains no wildcards, it is treated as a contains search by wrapping it with * on both sides; if it contains * or ?, it is treated as a wildcard pattern.
- Displays matching layers in a fixed-width list with a sticky header and “faux columns” that show key layer properties (On/Freeze/Lock/Plot/Color/Linetype/Description).
- On Freeze, runs VPLAYER to freeze each selected layer for the active viewport context.

Copy2Layouts
- Creates a temporary DCL file each run and assigns a unique dialog name so the dialog definition cannot collide with older cached DCL definitions.
- Lets the user pick a selection set from the drawing and displays Total: N only, without any object-type breakdown.
- Lists only paper-space layouts (excludes Model) and supports filtering layout names using wildcard patterns * and ?.
- Copies selected objects to the target layouts using ActiveX CopyObjects into each destination layout’s paper-space block, wrapped in an UNDO Begin/End group for one-step rollback.
- Runs as a looped dialog workflow: Apply Filter and Pick return to the dialog, Copy completes the operation and exits on success, Close exits without changes.
RotateMtextVport
This command adjusts text orientation based on the current viewport rotation:- MTEXT objects are reset to 0° rotation (horizontal) with top-left attachment point
- TEXT objects are rotated to match the viewport’s UCS X-axis angle with left alignment

SelectLayout
This command creates an interactive dialog box to switch between layouts:- Retrieves all paper space layouts from the current drawing (excludes Model space)
- Generates a temporary DCL dialog file with a list box interface
- Displays layouts in a scrollable list for user selection
- Activates the chosen layout upon confirmation

TitleBlocksTools
This integrated toolset combines CSV export and import functionality for titleblock attribute management:- Main Menu Dialog provides radio button selection between Export and Load CSV operations
- EXPTBCSV_EXPORT – Exports titleblock attributes to CSV format from paper space inserts:
- User picks titleblock inserts interactively until pressing ENTER
- Collects all instances across all paper space layouts
- Displays available attribute tags with numbered list
- Allows tag selection via “All”, “None”, or range syntax (1,3,5-7)
- Outputs CSV with columns: DWG, Layout, Block, plus selected tags
- Handles Excel-problematic values (dates, formulas) with single-quote prefix
- Escapes commas, quotes, and newlines using proper CSV quoting
- Auto-opens in Excel via hard-coded path with registry and fallback detection
- UTB2 – Updates titleblock attributes from CSV (Lee Mac’s Update Titleblock V1.9):
- Matches current drawing name against first column of CSV
- Optional Layout column filter for layout-specific updates
- Optional Block column filter for block-specific updates
- Updates only attributes whose tags match CSV column headers
- Changes only when attribute values differ from CSV
- Supports dynamic blocks via effective name resolution
- Handles duplicate attribute tags correctly
- Single UNDO mark for entire operation
- Configurable block name wildcard filter (UTB2:ftr)
- Can run automatically on drawing open (commented by default)
- Enhanced Help Dialog with comprehensive documentation:
- Displays LISP file path and full usage instructions
- Unicode/ASCII toggle for bullet points and arrows
- Multi-select list with Copy Selected and Copy All to clipboard
- Copy Path button for LISP file location
- Integrated Explorer and Notepad++ launcher buttons
- Explains CSV format, column requirements, and workflow
- File Management Tools:
- Explorer button opens folder containing LISP file with file pre-selected
- Notepad++ button opens LISP in editor (detects installation paths)
- Reload button reloads LISP file from disk without closing AutoCAD
- Path resolution via %USERPROFILE% environment variable
- Persistent Settings – Remembers last selected option and Unicode preference across sessions

LockAllVp
- This tool provides a DCL dialog to manage viewport locking by layout, with multi-select layout targeting and per-layout status display.
- It is designed to avoid ARX/DCL callback crashes by not running fragile command sequences from dialog callbacks and by applying changes using safer mechanisms where possible.
- The list shows each layout name and a computed status: Locked, Unlocked, Mixed, or NoVP.
- After clicking Lock or Unlock, the dialog should refresh the list so the status reflects the new state immediately.

Zoom Extend Window
User workflow- Run ZEZW to open the layout selection dialog.
- Use the filter box with wildcards * and ? to narrow the layout list.
- Optionally toggle Include Model to show or hide MODEL in the list.
- Multi-select layouts in the list (fixed width display shows layout name and status).
- Click ZE (Zoom Extents) to zoom extents on each selected layout in Paper Space.
- Click ZW (Zoom Window) to pick two corners once, then apply the same zoom window to each selected layout in Paper Space.
- If selection is empty, the program prompts the user to select one or more layouts before running zoom.

Zoom Extend
User workflow- Run LZE.
- Select one or more Layouts from the list.
- Optional filter using wildcards * and ?.
- Optional toggle Include Model to show MODEL in the list.
- Optional Copy to Clipboard to copy selected layout names and status.
- Trigger Zoom Extents, the dialog closes, then zoom is applied to each selected layout tab.

Zoom Window
User workflow- Run LZW.
- Select one or more Layouts from the list.
- Optional filter using wildcards * and ?.
- Optional toggle Include Model to show MODEL in the list.
- Optional Copy to Clipboard to copy selected layout names and status.
- Trigger Zoom Window, the dialog closes, then pick two corners for the window, and the same window is applied to each selected layout tab.
- If point picking is cancelled, the routine cancels the action and restores the original tab.

AnnoAllOnOff
- Generates an embedded DCL dialog at runtime that provides a Mode selector and a multi-select list of Model / Layout tabs.
- Mode is chosen via radio buttons: Visible (AAON) sets ANNOALLVISIBLE to 1, and Hidden (AAOFF) sets it to 0.
- Tabs are selected via list box with helper buttons All and None, then applied on OK.
- Note: ANNOALLVISIBLE is stored per Model/Layout tab, so the change is applied by switching tabs rather than modifying viewport entities.

AnnoAllOff
- Builds a temporary DCL dialog at runtime that lists all tabs (including Model) and allows multi-selection.
- After the user confirms the selection, the routine switches to each chosen tab and runs the command ANNOALLVISIBLE with value 0.
- Stores and restores key environment state such as CTAB, TILEMODE, and MSPACE so the user returns to the prior context after execution.
- Note: the variable ANNOALLVISIBLE is maintained per Model tab and per Layout tab, so this routine applies changes per tab rather than per viewport entity.

AnnoAllOn
- Generates a temporary DCL dialog at runtime listing all tabs, including Model, with multi-select enabled.
- On confirmation, switches to each selected tab and runs ANNOALLVISIBLE with value 1 to enable annotation visibility for that tab.
- Preserves and restores user context by saving CTAB, TILEMODE, and MSPACE before changes, then restoring them afterward.

LayoutTools
What it does from the user perspective- The user runs LayoutTools to open a DCL dialog listing layout tabs with status columns.
- The user filters layouts by wildcard pattern such as * and ?, and can optionally Include Model in the list.
- The user selects layouts in the list, or switches scope to All displayed to target every currently shown layout in the dialog.
- Lock and annotation actions run immediately while the dialog remains open, and the list refreshes to show updated statuses.
- Zoom actions are requested in the dialog, then executed after the dialog closes so point picking is safe for Zoom Window.

DuplicateLayouts_00
- Creates a temporary DCL file at runtime and opens a dialog listing available layouts (excluding Model).
- Allows the user to assign a Number of copies to the currently highlighted layout using Set Count, building an internal map of LayoutName → CopyCount.
- Shows the chosen layouts and counts in a summary list; the user can remove entries via Delete prior to execution.
- On OK, duplicates each selected layout the requested number of times by calling ._layout _copy and naming copies with an incremented numeric suffix (e.g., Layout_01, Layout_02).

DuplicateLayouts_01
What the user does- Run DuplicateLayouts to open the DCL dialog.
- Select a layout in Available Layouts and enter Number of copies.
- Press Set Count to add or update that layout in Selected Layouts and Copies summary.
- Press Apply to duplicate and keep the dialog open, or press OK to duplicate and exit.
- Press Undo to undo the last session operation, then continue working in the dialog.
- Press Delete to remove an item from the summary when a summary row is selected, otherwise delete the selected available layout tab from the drawing.

SetPublishLocation_01
Description- Displays layouts in synchronized columns: Name, Plot Device, Page Setup, Paper Size, Lock, Anno, Zoom.
- Supports wildcard filtering and scope control: Selected or All displayed, with optional inclusion of Model in list and apply actions.
- Provides per-column horizontal scrolling for the main text columns using sliders that shift the visible substring left or right without changing stored values.
- Shows full values for the first selected layout in the Selected full area: Name full and Paper full.
- Performs safe context switching when needed by temporarily controlling TILEMODE, CTAB, and MSPACE, then restoring the prior state to avoid disrupting the user environment.

SetPlotDeviceNames_00
- Loads COM and targets a single plot configuration name: DWG To PDF.pc3.
- Gets the active document and its Layouts collection, then loops through each layout.
- For each layout, refreshes plot device information, retrieves the list of available plot devices, and checks whether the target device exists.
- If available, sets the layout’s ConfigName to the target device; otherwise, prints a message naming the layout that lacks the device.
Clear_Bookmarks
This command displays a confirmation alert asking whether the user wants to clear all saved text positions. If confirmed, it removes all entries from *textPositions*, the list used to store entity bookmarks created by c:BMEntityPos. If the user cancels, the function safely exits without modifying existing data.Add_Bookmark
This routine lets you select a mixed set of supported entities and extracts a simple “label + start point + end point” triple for each, then pushes that triple into a global bookmark list for later processing by other tools or routines. For text and block inserts it uses their insertion point and a synthetic end point offset, for lines and splines it uses their defined endpoints, for polylines it uses the bounding box corners, and for circles it uses center plus a radius-based corner point. After all selected entities are processed, it reports the total number of bookmarked entries now stored, building up a reusable memory of object positions across multiple command runs.Slope_00
This routine provides a configurable slope-labeling tool for AutoCAD drawings, allowing the user to specify labeling format, measurement precision, vertical & horizontal scaling, and position offset before placing slope annotations. After configuration, the user selects two points representing the measurement line. The routine computes run and rise, detects slope direction, applies the chosen formatting rules, and places a TEXT entity at a controlled position relative to the middle of the picked segment. The process can be repeated by running the command again with the same or modified dialog settings.Copy_to_Clipboard_Xref
• Nested Picking: Lets the user select entities *inside* blocks or complex structures using NENTSELP. • Entity Duplication: Each picked item is duplicated using ENTMAKEX so its text can be extracted independently. • Transformation: Applies the exact nested transformation matrix so the copy matches the original nested orientation. • Text Extraction: Reads text differently depending on entity type: TEXT, MTEXT, DIMENSION, LEADER, or BLOCK attributes. • Clipboard Export: After finishing selections, CTCCOPY extracts text from all temporary copies and sends it to the Windows clipboard. • Cleanup: Deletes all generated temporary entities after copying text so the drawing stays unchanged.
CreatesXrefsLayersAssign_vs.00
The dialog shows one row per found xref: a checkbox to include or skip that xref, the xref name, and a layer popup listing all layers in the drawing. There are buttons to select all or select none, to create suggested layers for the checked xrefs, and to assign the chosen layers to all inserts of the checked xrefs in model space and paper space. The routine also tries to detect the current insert layer of each xref and preselects it in the popup if it exists. A status text at the bottom reports how many xrefs were found and how many layers are available for assignment.
