Short description
Purpose: Provide a portable, dialog-based manager for AutoCAD named views with filtering, zoom, rename, delete, and restore capabilities Scope: Works entirely on named views in the current drawing using only basic AutoLISP, ActiveX, and a temporary DCL file Interaction style: Single dialog with live filter, match-case toggle, multi-select list, and action buttons that keep the dialog open for iterative operations

Command:
Command: NamedViewList Execution: Type NamedViewList and press Enter Dialog title: Select Named View Main controls: • Filter text box (live updates list) • Match case toggle • Clear button for the filter • Multi-select list of named views • Count label showing “X of Y views” • OK, Zoom, Delete, Cancel buttons Close behavior: Only OK or Cancel close the dialog; Zoom and Delete keep it open
Description:
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.
Helper function: (if any)
• NVL-len — Wrapper for strlen to get string length • NVL-up — Uppercases strings using strcase for case-insensitive operations • NVL-trim — Trims leading and trailing spaces from a string without using vl-string-trim • NVL-strcmp — Lexicographic string compare (case-sensitive) returning -1, 0, or 1 • NVL-cicmp — Case-insensitive comparator built on NVL-strcmp and NVL-up • NVL-sort — Insertion sort utility that sorts a list using a comparator function symbol • NVL-filter — Filters a list by predicate function symbol, returning only items that match • NVL-pos — Returns zero-based index of an item in a list or nil if not found • NVL-any — Returns T if any element in a list satisfies the predicate function • NVL-replace-char — Replaces all occurrences of one character in a string with another • NVL-parse-indexes — Converts list_box selection string (space/comma separated) into a list of integers • NVL-del-view — Safely deletes a named view by name via ActiveX (vla-item / vla-delete) • NVL-zoom-view — Zooms to a named view using Document.ActiveViewport.SetView and reapplies viewport • NVL-fill-list — Populates the list_box with the current filtered view list and updates the count label • NVL-apply-filter — Applies the current filter text and case-match setting to update viewFiltered and the UI • NVL-rename-at-index — Renames a view at a specific filtered index, checks for name conflicts, runs RENAME, and refreshes lists • *error* — Global error handler that reports errors (except cancel/exit), unloads dialog, deletes temp DCL, and exits cleanly
Functionalities:
• Automatic view collection — Reads all named views from the current drawing and sorts them case-insensitively • Live filtering — As you type in the Filter box, the list updates instantly using wildcard matching • Case sensitivity toggle — “Match case” toggle switches between case-sensitive and case-insensitive filters • Multi-selection — The list box allows multiple view selection and stores indices for later operations • Inline rename — Double-clicking a view in the list triggers a rename prompt and live update of the sorted view list • In-place delete — The Delete button removes selected views via ActiveX and refreshes the filtered and full lists without closing the dialog • Zoom without closing — The Zoom button switches to the first selected view while the dialog remains open for further navigation • Batch restore — After clicking OK, each selected view is restored in sequence using the -VIEW _R command • Temporary DCL management — Writes a compact DCL definition to a temp file, loads it, then deletes it after dialog use or error • Portable implementation — Avoids reliance on higher-level vl-string or float flags and uses only explicit helper functions for portability
Result:
• View navigation — User can quickly find and zoom to any named view using filter and zoom without leaving the dialog
• Clean view list — Unwanted views can be deleted directly from the interface, keeping the named view list organized
• Consistent naming — Views can be renamed in-place with conflict checks, ensuring unique names
• Batch restore — Selected views are restored after OK, enabling quick cycling or setup of multiple views in one run
• Non-destructive settings — Aside from view edits, no drawing geometry is modified, and all temporary UI artifacts are cleaned up
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
Tags: Bookmark
Tags: Bookmark
