Function Syntax: HS Version: 1 Date: 01.04.2011 https://dwg.ru/dnl/9297 Command name HS (type HS at the AutoCAD command line) Description This program provides a dialog with three display options that control object visibility by editing the entity DXF group code 60 (visibility) on selected entities or on all entities in the drawing, followed by a REGEN to refresh the display. User interaction • Running HS opens a dialog titled Display Objects Options. • The user chooses one radio option: Isolate the selected. Hide selected. Display all. • The user clicks OK to execute or Cancel to exit. High-level workflow • Writes a temporary DCL file (dialog definition) to the temp folder using vl-filename-mktemp. • Loads and opens the dialog with load_dialog and new_dialog. • Remembers the last selected radio option using the global variable *HS-last-option* and preselects it next time. • On OK, executes one of three routines that set or clear visibility flags on entities using entget, entmod, and a final REGEN. Functionalities • Provides three visibility operations: • Isolate selected objects by hiding everything else. • Hide selected objects only. • Show all objects by clearing hidden flags globally. • Uses selection sets for scope control: • User selection via ssget. • Entire drawing selection via ssget "X". • Ensures the visibility group code exists on each entity by adding it when missing. Option behavior details • Isolate the selected (function to_ob_izol): • Prompts the user to select objects to keep visible. • Selects all entities in the drawing with ssget "X". • Sets DXF visibility code 60 to 1 for all entities (hide everything). • Sets DXF visibility code 60 to 0 for the user selection (unhide selected). • Runs REGEN to update display. • Hide selected (function to_ob_hight): • Prompts the user to select objects to hide. • Sets DXF visibility code 60 to 1 for that selection only. • Runs REGEN. • Display all (function to_ob_show): • Selects all entities in the drawing with ssget "X". • Sets DXF visibility code 60 to 0 for all entities (unhide all). • Runs REGEN. Important commands and calls highlighted vl-filename-mktemp — creates a unique temp filename for the DCL dialog. load_dialog and new_dialog — loads and opens the dialog. action_tile — captures the selected radio button and stores it in *HS-last-option*. ssget and ssget "X" — builds selection sets for selected-only or all-entities operations. entget — reads the entity DXF list. assoc 60 — retrieves visibility flag if present. entmod — writes the updated DXF list back to the entity. REGEN — refreshes the display to reflect visibility changes. Outputs and messages • If the dialog is cancelled: prints Command canceled. • If OK is pressed but no option is detected: shows alert No valid option selected. Operational notes and limitations • This routine does not use the native AutoCAD ISOLATEOBJECTS or HIDEOBJECTS commands; it directly edits entity visibility via DXF group code 60. • Some entity types, xrefs, or special objects may not behave as expected when forced hidden by group code 60. • Because it edits every entity for isolate and show-all operations, performance can degrade on very large drawings. • The code block contains duplicated definitions of the dialog writer and runner; functionally they produce the same dialog and behavior, with the later definitions overriding earlier ones.