FreezeLayersInMS

Short description

  • FLMS3 — Model Space layer control dialog: filter + multi-select + batch actions (Freeze/Off/Lock/Plot, etc.) with optional Xref scoping
  • Fixes: filters never show stray “T”; Xref layer names are displayed without the xref| prefix while operations still use full names internally
  • Persists filter/toggle/xref selections between runs via environment variables
freezelayersinms 000

Command:

  • FLMS3

Description:

  • 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.

Helper function: (if any)​

  • flms-clean-filter — converts a legacy filter value of "T" into empty string to prevent stray T from appearing in the UI.
  • flms-has-wc — detects if a filter contains wildcard characters so the routine can treat it as a raw pattern vs auto-wrapping with *text*.
  • flms3-disp-name — strips the xref| prefix from a layer name for display only (operations still use the full name).
  • flms-pad — pads/truncates strings to fixed widths for aligned columns in a fixed-width font list box.
  • flms-aci->name — maps common ACI color indices to readable names; otherwise returns the number as a string.
  • flms3-disp-line — builds the per-layer display row: source (C/X), stripped name, On/Frz/Lck/Plt, Color, Linetype in fixed-width columns.
  • flms3-get-all-xrefs — collects and sorts xref block names from the Blocks collection using IsXRef.
  • flms3-get-layers — collects and sorts all layer names from the Layers collection (includes full names, including xref prefixes).
  • flms3-parse-indexes — parses DCL multi-select index strings (space-delimited) into integer lists.
  • flms3-restore / flms3-snapshot — restore and persist UI state (filters, toggles, selected xrefs) using getenv / setenv.

Functionalities:

  • State management — global variables track filter text, xref filter, scope toggles, selected xrefs, selected layer names, and both full/display lists for the layer list box.
  • Filter normalization — UI filter values are read as strings; a legacy "T" value is normalized to empty, preventing unexpected filter behavior/appearance.
  • Xref filter + selection — xref list is filtered by wildcard or contains-match, filled into lbXrefs, and prior selections are re-applied by index mapping.
  • Scope toggles — Current_Layers / Xref_Layers / Both determine whether matches include only non-xref layers, only xref layers (optionally limited to selected xrefs), or all layers.
  • Matching layer evaluation — a layer matches when it satisfies the name filter (wildcard or contains-match) and the scope rules (current/xref/both + selected xrefs).
  • Display vs true names — the list shows a formatted row where the layer name is displayed without xref| prefix, but selection indexes map back to the full layer names for operations.
  • Multi-select mapping — layer selections are tracked by index in lbLayers and translated back to flms3*listFull to populate flms3*selNames.
  • Batch operations — action buttons call flms3-apply which sets VLA properties on each selected layer: Freeze, LayerOn, Lock, Plottable toggles.
  • UI enable/disable — the Xref list box is enabled only when Xref_Layers or Both is selected; otherwise it is disabled via mode_tile.
  • Dialog lifecycle — writes DCL to a temp path, loads/opens dialog, wires action tiles, runs, snapshots state, unloads dialog, deletes the DCL file.
  • User feedback — after each action, prints a summary line such as Freeze applied to N layer(s).

Result:

  • Running FLMS3 presents a filterable, multi-select layer management dialog that can target current layers, xref layers, or both, with optional selection of specific xrefs to constrain xref-layer matching.
  • Selected layers can be batch-modified (Freeze/Unfreeze, Off/On, Lock/Unlock, Plot/NoPlot) and the routine reports how many layers were affected.
  • Xref layer names appear without the xref| prefix in the list for readability, but actions are applied to the true full layer names; filter/toggle selections persist between runs without showing a stray T.

Images, animations etc.

freezelayersinms 000
freezelayersinms 001
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, Model Space
0
Would love your thoughts, please comment.x
()
x