Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
MicroStation Wiki Overriding And Resynchronizing Level Attributes
    • Sign In

    • +MicroStation Wiki
    • -Administration Wiki
      • Adding "Display Style List" to custom Toolbox
      • +Administration - Legacy Content
      • Answers for the Levelly Challenged
      • Batch Convert Utility
      • Bentley Tablet Driver And CalComp DrawingBoard
      • Bypassing Port Problems In Windows 2000 And Windows XP
      • Cannot find survey ft option in Design File Settings > Units
      • Configuration Variable Processing
      • Configuration Variables In MicroStation V8
      • Creating Tool Icons
      • Customize item missing from Workspace menu
      • Customize Toolbox - Tool opens new Toolbox
      • DGN file association in Windows 10 (MicroStation Does not appear in list)
      • DGN Index Service - How to set up
      • DGN Index Service Setup ended prematurely – error 1603
      • Enabling Lock Pages In Memory Under Windows 7 and Vista
      • Error - Cannot locate a default SHX font. Please install msdefault.shx
      • Error - Unable to load/create dialog item of type 'IconCmd', id
      • Error 1402. Could not open key
      • Error 1603 during install
      • Error 1610 during install
      • Error 1625 during install
      • Error message when starting MicroStation, "ucf not found"
      • File Associations
      • File Correction and Audit Tools
      • Getting Started With The Standards Checker
      • Haven't Upgraded To The MicroStation V8 Format Yet
      • How to Copy User Preferences and User Configuration Files to a new or different PC
      • How to quickly add a number of folders to Microstation's reference files search paths
      • How To Reset User Preferences and Delete MicroStation's Temporary Files
      • Installing MicroStation V8 XM Edition silently
      • Installing MicroStation V8i (SELECTseries 3) Without an Internet Connection
      • Installing MicroStation V8i silently
      • Is there any easy way to determine key-ins or variable names?
      • Key-in command to define different pattern setting options
      • Keyin to encrypt dgn files
      • MicroStation - Creating a Custom Colour Book
      • MicroStation Command Line Options And Switches
      • MicroStation Failed to Start
      • MicroStation file access issues with shared network drives
      • MicroStation Memory Management
      • +MicroStation V8i Variables
      • MicroStation Virtualization FAQ
      • Migrating Customizations to MS V8i
      • Migrating Customizations to MS XM
      • MSDebug File
      • MSXML Issue
      • Networking Workspaces
      • Networking Workspaces the easy way
      • New Variables
      • Overriding And Resynchronizing Level Attributes
      • Restore MicroStation to Factory defaults
      • Script error during MicroStation Installation
      • Serving Up Efficiency
      • Sharing Your Workspace
      • System Fault 5 MDL abort in DITEMS
      • The Power Of The Workspace
      • To also see hidden Config-Variables
      • Unable to connect to an Oracle Database
      • Understanding File Locations And Reference Attachments In MicroStation
      • Updating To MicroStation V8 Format
      • Upgrading From 08.09.02.52 To 08.09.02.77
      • Windows Explorer ProgramData folder
      • Workmodes DGN/DWG
      • Workspaces on the Network
    • +Annotations Wiki
    • +Bentley View Wiki
    • +MicroStation PowerDraft
    • +Programming Wiki
    • +Visualization Wiki

     
     Questions about this article, topic, or product? Click here. 

    Overriding And Resynchronizing Level Attributes

      Product: MicroStation
      Version: N\A
      Environment: N\A
      Area: Administration
      Subarea: N\A

    Overriding Level Attributes

    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".

    MS_LEVEL_EDIT_ATTRIBUTE_LIST configuration variable

    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:

    MS_LEVEL_EDIT_ATTRIBUTE_LIST=OverrideColor

    • OverrideColor is editable for both Library levels & Reference levels

    MS_LEVEL_EDIT_ATTRIBUTE_LIST=ReferenceOverrideColor

    • OverrideColor is editable only for Reference levels

    MS_LEVEL_EDIT_ATTRIBUTE_LIST=LibraryOverrideColor

    • OverrideColor is editable only for Library levels

    MS_LEVEL_EDIT_ATTRIBUTE_LIST=ReferenceOverrideColor, LibraryOverrideColor

    • Equivalent to the first case

    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.

    Resynchronizing Level Attributes

    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:

    1. dgnlib update levels [all / overridesymbology / bylevelsymbology / custom]
    2. reference synchronize levels [all /overridesymbology / bylevelsymbology / custom] [ref-logical]

    "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:

    1. "all" : Synchronizes each and every level attribute.
    2. "overridesymbology" : Synchronizes only the override symbology related attributes - which include the override color, the override style and the override weight.
    3. "bylevelsymbology": Synchronizes only the bylevel symbology related attributes - which include the bylevel color, the bylevel style and the bylevel weight.
    4. "custom" : Synchronizes attributes as specified by the "MS_LEVEL_SYNC_ATTRIBUTE_LIST" configuration variable.

    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.

    MS_LEVEL_SYNC_ATTRIBUTE_LIST configuration variable

    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.

    Set RefLevelOverrides key-in

    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.

    Related GUI Changes

    A few Levels-related GUI changes have been done to accommodate level resynchronization:

    1. The "Update Levels" icon in the Level Manager is now active. When the icon is clicked, depending on which file is selected, one of "dgnlib update levels custom" or "reference synchronize levels custom" will be invoked.
    2. The right-click menu on a selected file in the level manager tree has an additional "Update Levels" item.
    3. There are now a number of level related configuration variables. These have now been consolidated into a new "Levels" category in the configuration dialog.

    MS_REF_REATTACH_LEVEL_SYNC_ATTRIBUTE_LIST

    (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 - RED
    OverrideStyle - Border
    OverrideWeight - 3

    In b.dgn, you override the following attributes for the level in a.dgn:

    OverrideColor - GREY
    OverrideStyle - 0
    OverrideWeight - 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 - GREY
    OverrideStyle - Border
    OverrideWeight - 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.

    MS_LEVEL_AUTO_SYNC_ATTRIBUTE_LIST

    (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:

     

    Configuration Variable Short Description Long Description
    MS_LEVEL_LIB_DIR Level Library Path Defines which default directory to look for when exporting levels or importing levels to/from a .csv, .dgn or .dgnlib file.
    MS_V7_LEVEL_NAME_PREFIX V7 to V8 Level Name Prefix Defines the prefix to apply to unnamed levels when a V7 design file is upgraded to a V8 DGN file.
    MS_V7TOV8_CSVNAME V7 to V8 Level CSV File Defines the .csv file which controls how levels are mapped when a V7 design file is upgraded to a V8 DGN file.
    MS_V7TOV8_DELETE_UNUSED_LEVELS V7 to V8 Delete Unused Levels If set to 1, all unused levels are deleted when a V7 design file is upgraded to a V8 DGN file. This variable is ignored if "V7 to V8 Level CSV File" variable is set.
    MS_LEVEL_SYNC_ATTRIBUTE_LIST Control Level Attribute Sync As explained above.
    MS_LEVEL_EDIT_ATTRIBUTE_LIST Control Level Attribute Sync As explained above.
    MS_REF_REATTACH_LEVEL_SYNC_ATTRIBUTE_LIST (Added to MicroStation V8.1) Specifies the list of level attributes that will sync when a reference is reattached. As explained above.
    MS_LEVEL_AUTO_SYNC_ATTRIBUTE_LIST (Added to MicroStation 2004 Edition) Controls the list of level attributes that will automatically synchronize when a file is opened. As explained above.

    See also

    Other language sources

      Original Author: Bentley Technical Support Group
    • MicroStation V8
    • MicroStation
    • overrides
    • Reference
    • Levels
    • Share
    • History
    • More
    • Cancel
    • Dan Koval Created by Bentley Colleague Dan Koval
    • When: Fri, Sep 6 2013 1:58 PM
    • Andrew Bell Last revision by Bentley Colleague Andrew Bell
    • When: Sun, Sep 17 2017 8:09 PM
    • Revisions: 3
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies