You are currently reviewing an older revision of this page.
Document Type: TechNote
Original Author: Bentley Technical Support Group
Legacy Document Number: 8244
Document Type: TechNote
Original Author: Bentley Technical Support Group
Legacy Document Number: 8244
Whenever a new attachment is created, a copy of the attachment's levels are made and stored in the master file. At the point when the attachment is made, an attachment level will have the same attributes that its corresponding level in the source file has. After the attachment is made, the attachment's level attributes can be changed independently of its source file levels. The source file levels can also be changed without affecting the attachment's level attributes.
Similarly, when an element is placed on a library level that is attached to a file, a copy of the library level is made in the file.
Up until very recently, the attributes of the library level could not be modified. Based on user feedback, this behavior has been changed. Now any attribute of a library level can be changed, so that a library level behaves somewhat similarly to an attachment level. The attributes of a library level, once used in the MasterFile, can be changed independently of its attributes in its source library file. The source library file levels can also be changed without affecting the files in which the levels are used.
Administrators can control which library levels or attachment level attributes may be overridden in a file. This can be done by setting a configuration variable "MS_LEVEL_EDIT_ATTRIBUTE_LIST".
The "MS_LEVEL_EDIT_ATTRIBUTE_LIST" configuration variable controls which of the level attributes can be edited or overridden. The attributes to be edited can be one or more of the following as a comma separated list: OverrideSymbology, OverrideColor, OverrideStyle, OverrideWeight, ByLevelSymbology, ByLevelColor, ByLevelStyle, ByLevelWeight, GlobalDisplay, GlobalFreeze, Lock and Plot.
OverrrideSymbology encompasses OverrideColor, OverrideStyle and OverrideWeight. ByLevelSymbology encompasses ByLevelColor, ByLevelStyle and ByLevelWeight.
OverrideStyle and ByLevelStyle include both the actual style parameters and their corresponding custom style overrides, if any.
If an attribute is listed in MS_LEVEL_EDIT_ATTRIBUTE_LIST, then that attribute is editable for library levels and attachment levels. If the attribute is not listed in the MS_LEVEL_EDIT_ATTRIBUTE_LIST, then the attribute is not editable for library & attachment levels. All attributes of levels local to the active file are not affected by this configuration variable. The attribute name may be prefixed by "Library" or "Reference." For example:
If MS_LEVEL_EDIT_ATTRIBUTE_LIST is undefined, then all the attributes are editable.If MS_LEVEL_EDIT_ATTRIBUTE_LIST is blank, then none of the attributes are editable - this is probably not a good idea, since this will lock down on the ability to change any attributes, even attributes such as GlobalDisplay & GlobalFreeze.
Given that an attachment/library level can get out of sync with its source level, MicroStation supports a set of key-ins to resynchronize the levels. The key-ins are:
"dgnlib update levels" is a pre-existing key-in. It synchronizes attributes of those library levels used by the current file so that they are the same as those in the library file. The key-in has been expanded to support an additional attribute-control parameter that controls which level attributes are synchronized. The attribute-control parameter can be one of the following:
If the attribute-control parameter is not specified, then MicroStation defaults to "custom".
In addition to synchronizing library levels of the master file, "dgnlib update levels" also drills down all the attachments of loaded models and synchronizes their attachment levels too. This has the advantage that all the levels in the current file can be synchronized with one command.
Reference synchronize levels is a new key-in. It synchronizes attributes of reference levels of the specified attachment (as specified by the [ref-logical] parameter) to be the same as that in the source file of the attachment. If a reference level comes from a level library (as specified in the MS_DGNLIBLIST variable), then the command further synchronizes the level to its attributes in the library. This key-in also takes the additional [all / overridesymbology / bylevelsymbology / custom] attribute-control parameter that controls which of the level attributes are synchronized.
In addition to synchronizing levels of the specified attachment, "reference synchronize levels" also drills down all of its nested attachments and synchronizes their attachment levels too.
Note that synchronizing nested attachment levels is session specific in versions 8.0 and 8.1, since the storing of nested attachment level data was added in the MicroStation V8 2004 Edition.
The "MS_LEVEL_SYNC_ATTRIBUTE_LIST" configuration variable controls which of the level attributes can be synchronized. The level attributes can be defined in the same way as for the MS_LEVEL_EDIT_ATTRIBUTE_LIST configuration variable.
If the MS_LEVEL_SYNC_ATTRIBUTE_LIST configuration variable is undefined, then it will default to MS_LEVEL_EDIT_ATTRIBUTE_LIST. If MS_LEVEL_EDIT_ATTRIBUTE_LIST is also undefined, then the "dgnlib update levels custom" and "reference synchronize levels custom" will default to synchronizing the OverrideSymbology and ByLevelSymbology attributes.
This is a new key-in which controls if the level override for a reference attachment should take effect or not. By default "RefLevelOverrides" is set to ON, i.e. attributes of reference attachment levels can be overridden.
"RefLevelOverrides" is a tcb variable and can be controlled per DGN File."Set RefLevelOverrides OFF" will switch off the ability to override attachment levels."Set RefLevelOverrides ON" will switch on the ability to override attachment levels."Set RefLevelOverrides TOGGLE" will invert the current state of the tcb variable.
If the value of the "RefLevelOverrides" variable is changed, then in order for the change to take effect it is necessary to do a "Save Settings" and reload the file.
When RefLevelOverrides is set to OFF, then all attachment level attributes will be loaded from the source file of the attachment. Thus any change in the level attributes in the source file will be immediately reflected in the attachment also.
Note that while RefLevelOverrides is OFF, it is still possible to change an attachment's level attributes. But this change will be valid in the context of the current session only and is not stored to file. The next time the file is reloaded, the attachment's level attributes will revert to those in its source file.
A few Levels-related GUI changes have been done to accommodate level resynchronization:
(Added to v8.1)
Specifies the list of level attributes that will sync when a reference is reattached. The attributes can be one or more of the following as a comma separated list: OverideSymbology, OverrideColor, OverrideStyle, OverrideWeight, ByLevelSymbology, ByLevelColor, ByLevelStyle, ByLevelWeight, GlobalDisplay, GlobalFreeze, Lock, Plot.
For example, say b.dgn references a.dgn and you want to reattach the reference (a.dgn) and synchronize only the OverrideColor set in the active file (b.dgn) while retaining all of the other attributes originally set in the reference (a.dgn). You would set MS_REF_REATTACH_LEVEL_SYNC_ATTRIBUTE_LIST to OverrideColor. Let's set up a simple scenario with one level. The level in a.dgn has the following attributes:
OverrideColor - REDOverrideStyle - BorderOverrideWeight - 3
In b.dgn, you override the following attributes for the level in a.dgn:
OverrideColor - GREYOverrideStyle - 0OverrideWeight - 0
If you set MS_REF_REATTACH_LEVEL_SYNC_ATTRIBUTE_LIST to OverrideColor and reattach a.dgn, only the OverrideColor attribute will synchronize and you will get the following attribute settings:
OverrideColor - GREYOverrideStyle - BorderOverrideWeight - 3
Note that I just used the Override attributes to keep the example simple. All of the other attributes (ByLevelSymbology, GlobalDisplay, etc.) will not synchronize when the reference is reattached in the above example.
(Added to MicroStation 2004 Edition)
This variable controls the list of level attributes that will automatically synchronize when a file is opened. The attributes can be one or more of the following as a comma separated list: OverideSymbology, OverrideColor, OverrideStyle, OverrideWeight, ByLevelSymbology, ByLevelColor, ByLevelStyle, ByLevelWeight, GlobalDisplay, GlobalFreeze, Lock, Plot. Each of the above attributes can take a "Reference" or "Library" prefix. If the prefix is not used, both reference and level library levels will be synchronized.
This variable is very similar to MS_LEVEL_SYNC_ATTRIBUTE_LIST, however it is not necessary to manually update the Levels when they become out of sync with the source file. For example, if you would like to always synchronize the ByLevelColor attributes back to the references, but be able to override the references ByLevelWeight, you would set MS_LEVEL_AUTO_SYNC_ATTRIBUTE_LIST to ReferenceByLevelColor. The ByLevelColor will synchronize back to the references automatically when the file is opened, while retaining the overrides made to the reference's ByLevelWeight. If you then choose to synchronize the ByLevelWeight, you can manually Update Level and the ByLevelWeights will synchronize given MS_LEVEL_SYNC_ATTRIBUTE_LIST is set accordingly (see example above).
Following is a short description of the level-related configuration variable available from the "Levels" category:
Product TechNotes and FAQs
MicroStation Desktop TechNotes and FAQs
Bentley Technical Support KnowledgeBase
Bentley LEARN Server
Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!