Hide / Show Objects

Short description

Provides a dialog box for controlling object visibility in AutoCAD. Lets you choose between isolating, hiding, or displaying all objects using radio buttons and confirmation controls.
hideshowobjects 000

Command:

Command: c:HS Opens the “Display Objects Options” dialog where you can select whether to isolate selected objects, hide them, or show all objects again.

Description:

When executed, the program: • Step 1 Writes a temporary DCL file defining a simple dialog with three radio buttons and OK/Cancel controls. • Step 2 Opens the dialog and preselects the last used option (default “Isolate the selected”). • Step 3 Captures which option the user selects and runs the matching visibility function:   – “Isolate the selected” → hides everything else.   – “Hide selected” → hides only the chosen objects.   – “Display all” → shows every hidden object again. • Step 4 Redraws the view after the visibility change. • Step 5 Restores the previous choice as default for next run.

Helper function: (if any)​

Helper Functions Used:writeHSDCL — Creates the DCL dialog definition dynamically and writes it to a temp file.radioHSDCL — Loads and displays the dialog, handles user input, and sets the selected option variable.to_ob_izol — Isolates the selected entities by hiding all others (sets entity visibility attribute 60 = 1 for all non-selected).to_ob_hight — Hides only the selected entities by setting their visibility to 1.to_ob_show — Restores visibility of all entities by setting attribute 60 = 0 for all.

Functionalities:

Main Functionalities:Dialog-driven visibility control — Choose from isolate, hide, or show-all directly via a simple UI.Remembers last selection — Automatically selects the last used option on the next run.Dynamic DCL creation — Builds its dialog at runtime without needing an external DCL file.Automatic screen refresh — Uses “_regen” after every visibility change to update the display.

Result:

Result: Depending on the user’s choice, the drawing updates to show only selected objects, hide them, or reveal all again. Visibility attributes are updated for all entities, and the screen refreshes automatically for immediate effect.
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: General_AutoCAD
0
Would love your thoughts, please comment.x
()
x