Live Nested Attachments Level Attributes And View Display


Document Information

Document Type: TechNote 

Product(s):  MicroStation

Version(s):  V8 2004 Edition

Original Author: Bentley Technical Support Group

Legacy Document Number:  8350

Overview

This TechNote is intended to provide an understanding of how changes to level attributes and/or view display for live nested attachments are propagated to the active file when made in the parent attachment. For purposes of this discussion, a level attribute can be one of the following: ByLevelColor, ByLevelStyle, ByLevelWeight, OverrideColor, OverrideStyle, OverrideWeight, Lock, Plot, Global Display, and Global Freeze. Additionally, the term View Display is used in the context of the Level Display dialog. Lastly, the concepts discussed here are specific to DGN Workmode. In other words, the active file and parent attachments must be V8 format DGN files.

Level attributes

When a file is attached to another file as a reference, the reference levels are written to the active file. However, if the reference too had an attachment, and the reference is live nested, the nested attachment levels are not immediately written to the active file. These important points are keys to understanding how live nested attachment level attributes behave.

Before we move ahead, it should be noted that having the same level name in the master file, parent, and nested attachments is not the same as having the nested attachment level in the active file. That is, there is more to a level than just a name. The importance of this will become clearer as we proceed.

Let us use a small example to illustrate the relationship between how nested attachment level attributes appear when viewed through the parent attachment and how they appear when viewed through the master file. For purposes of this discussion, the master file refers to the file to which the parent is attached. In the example, the master file, parent attachment and nested attachment all contain three used levels: ONE, TWO, and THREE. Additionally, the parent attachment is attached to the master file with a live nesting value of one.

If any of the level attributes in the nested attachment are changed through the parent attachment [meaning that the parent attachment is the active design file], these changes are also reflected in nested attachment as viewed though the master file. This is what is called a dynamic relationship. This dynamic relationship can be broken in one of two ways [both requiring that MS_LEVEL_EDIT_NESTED_ATTACHMENT_LEVELS be defined]: updating the nested attachment through the master file, directly editing the level attributes of the nested attachment through the master file. Once either is affected, the relationship between the nested attachment and the active design file becomes static; a static relationship implies that changes to the nested attachment though the parent will not be reflected in the nested attachment as viewed through the master file.

View display

There also exists the potential of a dynamic relationship for view display changes. In fact, the relationship is dynamic from the outset and is not broken until a change to the nested attachments view display is made while working in the active file. This should come as no surprise given that it is also the default relationship for nested level attributes [see above].

Returning to the example, when the parent is attached to the master file, the view display of the nested attachment through the parent attachment will be equivalent to the view display of the nested attachment though the master file. Given that the default relationship is dynamic, changes to the nested attachment's view display through the parent attachment will appear when the nested attachment is viewed through the master file. This relationship is broken or made static when the nested attachment's view display is changed through the master file and settings saved. Once broken, changes to the nested attachment through the parent will no longer be reflected in the nested attachment as viewed through the master file.

To understand this fully, it must be mentioned that the nested attachment's view mask [the element that controls view display] will only remain in the master file if the mask is different between the active file and the parent attachment. Conversely, if the view mask for the nested attachment is the same in parent attachment and the master file, saving settings while in the active file will remove the nested attachment's view mask.

For instance, if Level ONE in the nested attachment is turned off while working in the parent attachment [assume a Save setting unless noted otherwise], Level ONE in the nested attachment will be off in the master file as well. Now, if Level ONE in the nested attachment is turned on while working in the master file, the nested attachment's view mask is written to the master file. This means that changes to the nested attachment's view display, as made while working in the parent attachment, will not be displayed in the master file.

However, if Level ONE in the nested attachment is turned on while working in the parent attachment, the master file opened and settings saved, the nested attachment's view mask will be removed from the master file. This occurs because the view display for the nested attachment as viewed through both the parent attachment and master file is the same. What this means is that the dynamic relationship is once again in effect.

Deep nesting

MicroStation searches for the nested attachment levels starting with the active design file. If they are found, searching ends. If they are not found, the search moves down one level to the next file in the reference hierarchy, continuing to the parent of the nested attachment. As can be imagined, determining from whence the attributes or view display of a nested level are derived gets more complicated as the level of nesting increases. In fact, there will likely be times that a file between the active file and the parent attachment contains the nested levels. In these cases, you might have to look to that file to determine the source of the nested level attributes or view display.

 

New levels and assorted loose ends

When new levels are added to the nested attachment (see MS_REF_NEWLEVELDISPLAY), the relationship for both level attributes and view display will be dynamic. This is because the new nested attachment level is in neither the active file's level table nor view mask. At this point, the same rules apply as discussed above. Also, if the nest depth is changed to include a new level of nesting, the new nested attachment will by default have a dynamic relationship with respect to the active file.

Additionally, if either a single level, or single attribute, is updated, all of the target levels are written to the active design file. This means that unless the level is new to the attachment [see above], one level cannot have a dynamic relationship when the other levels have a static relationship. For that matter, one attribute cannot have a dynamic relationship while the remaining attributes are static.

Conclusion

An understanding of how changes to level attributes and view display for nested attachment levels are propagated is important for effective management and correct plotted output. It will certainly assist in deciding when to make attribute and display changes, when to manually update, when to automatically update and when to save settings.

See Also

Product TechNotes and FAQs

MicroStation Desktop TechNotes and FAQs

External Links

Bentley Technical Support KnowledgeBase

Bentley LEARN Server

Comments or Corrections?

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!