Short description
Sort / Purpose: Interactive Xref management tool for AutoCAD that saves, reloads, and bulk-edits Xref state via a dialog, while preserving the current UCS and view for bulk actions. • Type of tool: Dialog-driven Xref control command with filters, selection, zoom-to-xref, save/load list, and batch operations. • Scope: Works on all Xrefs in the current drawing, or only the user-selected subset (selection defaults to all). • Goal: Quickly standardize Xref configuration (Type + Found At + Units + Layer) and reapply it reliably across sessions without disrupting the user’s working context.

Command:
Command:
- UnReloadDetachSelectedXrefs — Opens the main dialog window.
- UI buttons — Execute actions and return to the dialog; the dialog closes only via OK or Cancel.
(UnReloadDetachSelectedXrefs)
Description:
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.
Helper function: (if any)
Helper function (if any):
- Xref scanning: Collects Xrefs from the block table and reads Name, Type, Units, Path, and primary insert Layer.
- Path resolve (Found At): Resolves stored/relative xref paths into absolute file paths when possible (DWGPREFIX + findfile logic).
- Selection map: Maintains per-xref selection state across filter changes and UI refreshes (default all selected).
- UCS + view wrapper: Saves and restores UCS and VIEW around disruptive commands so the user’s context is preserved for bulk actions.
- Ensure xref exists: If an xref name is missing from the drawing, attaches it from Found At using the saved Type before reloading.
- Change Type (Attach/Overlay): Converts type via detach + reattach while preserving transforms; restores layer placement afterward.
- Layer enforcement: Forces all inserts of an xref onto the layer recorded in the list file; creates the layer if it does not exist.
- Zoom2Xref: Zooms to the bounding extents of the selected xref inserts in Model space.
Functionalities:
Functionalities:
- Filter by Name: Wildcard filter using
*and?patterns. - Filter by Type: Dropdown list populated from Xref types present in the drawing (All / Attached / Overlay).
- Filter by Units: Dropdown list populated from units present in the drawing (All / mm / m / ft / …).
- Filter by Layer: Wildcard filter using
*and?patterns. - Selection control: Select All / Select None, selection counter, and multi-select list behavior used as “checkboxes.”
- Save List: Writes header HOSTINSUNITS and HOSTUCSNAME, then per selected xref writes Name|Type|FoundAt|UnitsCode|Layer.
- Load List (per xref): UCS reset to World → set drawing INSUNITS to the xref UnitsCode → attach if missing (Found At + Type) → reload → force inserts to saved Layer.
- Load List (final restore): Restores original drawing INSUNITS and UCS; keeps named UCS if present, otherwise uses a temporary UCS name for safe restore.
- Apply to Selected (Operation): Unload / Reload / Detach on selected xrefs only.
- Apply to Selected (Attachment): Attach / Overlay type conversion on selected xrefs only.
- ALL operations: Unload ALL / Reload ALL / Detach ALL / Attach ALL / Overlay ALL for all xrefs, executed with UCS+view preservation to prevent user context changes.
- Zoom2Xref: Zooms to the selected xref extents without requiring manual selection in the External References palette.
Result:
Result:
- Generates a reusable Xref list file containing drawing context and per-xref configuration: HOSTINSUNITS, HOSTUCSNAME, and Name|Type|FoundAt|UnitsCode|Layer lines.
- Re-applies Xref configuration deterministically to reduce unit-scaling and UCS-related inconsistencies during reload/attach workflows.
- Restores correct layer placement by forcing xref inserts onto the saved layer after load/reload actions.
- Preserves working context for bulk actions by restoring the original UCS and view after ALL operations complete.
Based on / Source code:
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
