Function Syntax: ChangeLayer Version: 1 Date: 09.09.2025 AI+https://www.theswamp.org/index.php?topic=58620.0 Description This AutoLISP program provides an intuitive interface for managing and switching between layers in an AutoCAD drawing. The user is presented with a filtered, searchable, and selectable list of visible layers, including an option to pick a layer directly from an object in the drawing. It streamlines layer control by allowing wildcard-based filtering and persistent settings across sessions. Key Functionalities: Prompts the user with a dialog interface to select a layer from the list of visible and unfrozen layers. Includes an edit box for entering a wildcard-based filter (asterix and ? supported). When the filter field is left empty, all visible layers are displayed. Adds a Pick Layer from Drawing button that allows the user to select any entity in the drawing to automatically extract its layer and populate the filter. The matching layer is highlighted in the list box, ready for confirmation. The layer is only changed when the user confirms with the OK button — Cancel exits with no changes. Remembers the last used filter across command runs using the AutoCAD registry (setenv or getenv mechanisms). Only visible and unfrozen layers are considered for the list (layers that are OFF or FROZEN are skipped). The core command can be executed using: CHLAY Typical Use Case: The user types CHLAY in the command line. A dialog appears, showing all available layers (filtered using the last-used or default filter). The user can manually type a filter, select a layer from the list, or click Pick Layer from Drawing to populate the filter and list automatically. Once the desired layer is highlighted, clicking OK sets that layer as the current active layer. Important Commands: CHLAY — Launches the layer selection interface. setenv or getenv — Used to persist the last-used filter. entsel — Allows selecting an entity from the drawing. assoc 8 — Retrieves the layer name from the selected entity. wcmatch — Performs wildcard-based filtering on layer names. Layer Conditions: Only layers that are both ON and THAWED are included in the list box. The logic filters layers using bitwise checks on assoc 70.