Answers for the Levelly Challenged


 Product:MicroStation
 Version:N/A
 Environment:N\A
 Area:Levels
 Subarea:N/A

When you use a DGNLIB file to control your users’ levels, you have to consider how much you want the file to control. Putting this in simple terms is a challenge, but here we go!

First, there are the level names themselves. Using a DGNLIB file will give your users a pick list of levels to choose from when placing an element. So when drawing an element, users will have a predefined choice of levels  to use.

Next are the overrides or by-level attributes. Again, these are set and the user does not have to make a choice. However, if users choose not to use what is presented to them for an attribute, then their changes will make the level out of sync with the library (and this is acceptable in some cases). If this is not the result needed or accepted, then you need to change what the users are actually doing in the file.

One way would be to ask the users not to draw in this manner. The other would simply be to set a variable that would change what the users have done on the fly (in the background, behind the scenes) by setting the variable MS_LEVEL_AUTO_SYNC_ATTRIBUTE_LIST. If it is set to ByLevelSymbology or OverrideSymbology it will synchronize the levels in the design file and its references to the attached DGNLIB file. If it is set to LibraryByLevelSymbology or LibraryOverrideSymbology only the design file itself will have its levels synchronized with the attached DGNLIB file. If it is set to ReferenceByLevelSymbology or ReferenceOverrideSymbology then only the active files references will have their levels synchronized with the attached DGNLIB file and not the active file.

If this sounds a little confusing, note that if you use the “library” prefix the variable tells MicroStation to sync only the active files levels, and if you use the prefix “reference,” it tells MicroStation to sync only the references of the active file. There is also a “manual” version of this variable that will allow the user to do this rather than making it happen automatically (this may be the case if you need to synchronize on a per-file basis). Setting the MS_LEVEL_SYNC_ATTRIBUTE_LIST will control all the above functions either when a key-in is used or the “update levels from library” button in the Level Manager dialog box is selected. Again this would be considered a manual process, performed in each file.

One thing to consider when deciding to work with a DGNLIB file is that if you are considering controlling the levels’ color, style, weight, and so on, you will need to make a decision if overrides or by-level functionality will be used. You can certainly use both, but this will become very confusing for you and your users. So it is best to stick with one during the process of a project.

Remember when using a DGNLIB file for your users’ levels pick list, a level does not exist in a user’s active file until an element is placed on that level. Once the level exists in the design file, it is separate from the DGNLIB file. It has its own settings (overrides, by-level, etc.). If you want this to match what is in the DGNLIB file, you will need to configure one of the above variables to make sure your DGNLIB file is followed.

When a level is added to the DGNLIB file, it will be reflected in all files using the DGNLIB (in other words, the new level will appear in the level list when the design file is opened). However, if a level is removed from the DGNLIB file, that will not necessarily be reflected throughout your users’ design files. If the level never existed (wasn’t used) in a design file, then when the file is opened, the level will not appear in the level list. If the level existed (was used) in the design file, it will remain in the level list.

In order for the level to be removed from the design file, all elements on the level must either be removed or moved to another level. Once this is done and the level is empty, it can be deleted from the design file. Graphics are not the only elements that might exist on a level. For example, a dimension style applied to a level, even though there are no elements on the level, prevents deleting the level. The dimension style must be removed from the file or moved to another level.

See also

https://communities.bentley.com/products/microstation/w/microstation__wiki/8861/levels-and-level-libraries

Other language sources

 Original Author:Bentley Technical Support Group