AnnoAllOff

Short description

  • Opens a DCL picker to choose Model/Layout tabs, then sets ANNOALLVISIBLE to 0 on the selected tabs.
  • Provides quick selection controls for All or None before applying the change.
annoalloff 000

Command:

  • Command: AAOFF

Description:

  • Builds a temporary DCL dialog at runtime that lists all tabs (including Model) and allows multi-selection.
  • After the user confirms the selection, the routine switches to each chosen tab and runs the command ANNOALLVISIBLE with value 0.
  • Stores and restores key environment state such as CTAB, TILEMODE, and MSPACE so the user returns to the prior context after execution.
  • Note: the variable ANNOALLVISIBLE is maintained per Model tab and per Layout tab, so this routine applies changes per tab rather than per viewport entity.

Helper function: (if any)​

  • AAOFF:WriteDcl writes the DCL definition to a temporary .dcl file used to display the selection dialog.
  • AAOFF:GetTabNames enumerates the document layouts via ActiveX and returns a list of tab names including Model.
  • AAOFF:MakeAllIndexString generates the space-separated index string required by a multi-select list box to select all items.
  • AAOFF:IdxList->Names converts the list box index string into the corresponding tab name list for processing.
  • AAOFF:SetAnnoAllVisible0 iterates selected tabs, forces paperspace on layouts, executes ANNOALLVISIBLE to set it to 0, then restores the previous tab and mode settings.
  • c:AAOFF orchestrates the workflow: builds the tab list, shows the dialog, handles All/None actions, applies the setting, and cleans up temporary files.

Functionalities:

  • Runtime DCL generation creates a dialog file in a temp location and loads it for the session.
  • Multi-select tab picker allows choosing any combination of Model and Layout tabs for updating.
  • All button selects every tab in the list box using a generated index string.
  • None button clears the selection to prevent changes from being applied.
  • Per-tab update switches CTAB for each chosen tab and sets ANNOALLVISIBLE to 0.
  • Layout handling forces paperspace on layout tabs by setting MSPACE false when TILEMODE indicates a layout context.
  • State restoration restores prior CTAB, TILEMODE, and MSPACE values after processing.

Result:

  • If the user confirms a selection, ANNOALLVISIBLE becomes 0 on each selected tab and the prior tab/mode state is restored afterward.
  • If no tabs are selected, prints AAOFF: Nothing selected. No changes made.
  • If the dialog is cancelled, prints AAOFF: Cancelled.
  • If the dialog cannot be loaded, prints AAOFF: Could not load dialog.
  • Always deletes the temporary DCL file and unloads the dialog definition at the end of the routine.

Images, animations etc.

annoalloff 000
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: Layouts, Paper Space
0
Would love your thoughts, please comment.x
()
x