Key-ins to switch levels on/off in a master file and (nested) references


How to switch a level in a nested reference on or off using a key-in.

In order to be able to switch on/off levels on a nested reference, the following settings/variables need to be checked first, to allow editing and saving the changes to the levels:
Key-in:
set refleveloverrides on
As that is a file specific setting, make it permanent by using File>Save Settings

Variables:
MS_LEVEL_EDIT_NESTED_ATTACHMENT_LEVELS  = 1
MS_LEVEL_LOAD_ATTACHMENT_FILTERS        = 1

To globally switch on/off levels, no matter a view is open or not, these key-ins can help:

General key-in syntax for switching levels in the master file:
level set display on/off "level name"

General key-in syntax for switching levels in all direct attachments (not nested):
level set display on/off file:*.* "level name"

General key-in syntax for switching levels in all nested references attached to direct attachments, so 1st nest depth.
level set display on/off file:*.*->*.* "level name"

General key-in syntax for switching levels in all nested references, attached to 1st nest depth attachments, so at 2nd nest depth level
level set display on/off file:*.*->*.*->*.* "level name"

As you can see, for each extra nest level, ->*.* is added.
So in short:
Direct attachments use: file:*.*
Nested attachments at 1st nest depth level use: file:*.*->*.*
Nested attachments at 2nd nest depth level use: file:*.*->*.*->*.*
Nested attachments at 3rd nest depth level use:   file:*.*->*.*->*.*->*.*
etcetera

The *.* of course can be replaced by the intended filename.extension.
In case the level name contains spaces, it needs to be enclosed in double quotes.
Wildcards ( * ) in the level name can be used too, so a level name like *test* will apply to all the levels that have the word test somewhere in the level name.

If you want to switch the levels of a specific file and the file name contains spaces, use double quotes like this:
Nested attachments at 2nd nest depth level use: file:"file name a"->"file name b"->"file name c"

To switch on/off nested levels per open view, the same idea applies, key-in:
master file syntax:
set levels on/off "level name"

direct attachment syntax:
reference levels on/off "level name" *.*

1st nest depth attachment syntax:
reference levels on/off "level name" *.*->*.*

2nd nest depth attachment syntax:
reference levels on/off "level name" *.*->*.*->*.*

reference levels on/off "level name" master.dgn->reference.dgn->nested_reference.dgn

After entering these view specific key-ins, you are prompted to select a view.
The view selection can be added too, using the key in: selview <view number>
 
Example:
In case View #1 is the view to be affected, enter:
set levels on/off "level name";selview 1
reference levels on/off "level name" *.*;selview 1

Notes:
the more wildcards, the slower the response will be, so avoid them if possible and specify intended level and file names.

the above information has successfully been tested in MicroStation V8 2004, V8 XM, V8i as well as in Navigator V8i and in the CONNECT Edition.