Import dxf vào microstation báo lỗi external data năm 2024

Editor's note: The following article was taken from MicroStation's Help file, which contains more information about sharing DGN and DWG data.

A reference is a model that is attached to, and displayed with, an active model for printing or construction purposes. In MicroStation V8, a reference is analogous to an AutoCAD external reference [XREF] or an AutoCAD overlay. This removes the need to save or translate a DWG in DGN format in order to attach it as a reference.

Working With References That Will be Saved to DWG Files

When you are working with a DGN file that will be saved to a DWG file:

  • Use the settings on the Save As DWG/DXF Options dialog box to control how MicroStation references will be handled in the DWG file format. See the Merging References section [below] when saving to a DWG file.
  • Do not attach the active model to itself as a reference [self-reference], since the DWG file format does not support this type of reference.
  • Use MicroStation's Live Nesting option, since it is compatible with AutoCAD's settings. See the Working With Nested References section [below].
  • You can set options in MicroStation to create references that can be saved to AutoCAD overlay attachments. See the Defining Overlay Attachments section [below].

Merging References When Saving to a DWG File

The DWG file format does not support all of the reference types available in MicroStation. As a result, you must use the Save As DWG/DXF Options dialog box>References tab to define how the following types of references are merged into the model:

  • External attachments - External attachments are separate files that can be attached to the main [default] design file as a reference. These attachments can be retained as separate attachments [and become AutoCAD XREFs], or can be merged into the default model.
  • Self-attachments - Self-attachments are references to the main design file from within, such as in the case of reference views used to create sheet models, for example. The DWG file format does not support self-attached references. They must be merged to be usable in AutoCAD.
  • Attachments to non-default models - The DWG file format only supports one design model. DGN files can have multiple design models. One of these models is defined as the default model. Attachments to non-default design models must be merged to display in AutoCAD.
  • Masked attachments - The DWG file format does not support clipping masks applied to references. Attachments with clipping masks must be merged, or the clipping mask will be removed in AutoCAD.

Figure 1: The Save As DWG/DXF Options dialog box, References tab

Working with Nested References

When a MicroStation design file that is being used as a reference also has its own attachments, these become nested references. The links between these files can be maintained through many levels [depths] of nesting, so that if you open only one file, you can view the contents of many files. The individual references can be updated, and the changes will be shown in the master [or parent] file. When you attach a parent reference to your model and turn on live nesting, you can also control how many levels of nested references are attached to the model.

In AutoCAD, there are two types of references that can be made to create file associations: attachments and overlays. Both allow the display of all objects in the attached file, as well as those in the nested references. Keep in mind that although AutoCAD allows live nested references, it does not provide control of nesting depth, and thus all data in the nested attachments is implicitly displayed.

Using Live Nesting in a DGN File That Will Be Saved to DWG Format

If your DGN file will be saved to a DWG file, make sure that your reference settings are compatible with AutoCAD's reference settings. To do this, turn on live nesting for the parent reference, and set the nest depth to a high number so that all nested references are included.

To attach a reference with live nesting:

Figure 2: Attach Reference dialog box

Figure 3: Attach Reference Settings dialog box

Figure 4: Attachment Settings dialog box In the Primary toolbox, click the References icon. The Reference dialog box opens. In the dialog box's tool bar, select the Attach Reference tool. The Attach Reference dialog box opens. Select the DGN file that contains the model to attach as a reference, and click OK. The Attach References Settings dialog box opens. From the Nested Attachments options menu, choose Live Nesting. The Nested Attachments options are only available when the selected model has reference attachments. When the Live Nesting option is on, the hierarchical structure of any nested references are maintained when attaching the parent reference to a model.

In MicroStation, a nested attachment is displayed only if the child reference does not have its Ignore Attachment When Live Nesting setting turned on [in the Attachment Settings dialog box], and the parent reference has Live Nesting enabled. This is an important fact and is sometimes overlooked by users.

In the Nest Depth field, enter a high value [for example, 10]. Set the depth setting to a high number to include even the most deeply nested references when the file is saved to DWG. Although the nested attachments will display in the view window, you will see only the parent reference in the References dialog box's list box. This setting can be selected when attaching the reference file.

Defining Overlay Attachments

An AutoCAD overlay is a type of reference. Unlike an AutoCAD attached reference, if it becomes a nested reference, it is not displayed, nor are any of the files attached to it. Thus, an overlay might be used when designers working on a portion of the project need to see information that will not necessarily be displayed at the parent file level. To create a MicroStation reference attachment that behaves like an AutoCAD overlay, turn on the Ignore Attachment When Live Nesting setting in the Attachment Settings dialog box.

Figure 5: Save As DWG/DXF Options dialog box, General tab When you save a DGN file to a DWG file, you can save reference attachments to DWG files as overlays. To do this, open the Save As DWG/DXF Options dialog box and turn on Create Overlays for Reference Attachments [No Live Nesting]. When this setting is on, all references are created as overlays, whether or not the Ignore Attachment When Live Nesting setting is on. This setting effectively disables live nesting in the DWG output file. It is useful for files where live nesting is turned off for all attachments.

Working in DGN files with Attached DWG Data

A model in a DWG file can be attached as a reference to a design or sheet model in the open file [DGN or DWG]. To attach the model in a DWG file as a reference, follow the procedure for attaching references.

Working with References in DWG Workmode

  • When attaching a reference, you can specify a level for the reference attachment. In an AutoCAD DWG or DXF file, each XREF or layout viewport is placed on a specific layer. When you open the DWG file in MicroStation, XREFs and layout viewports are treated as references, and are placed on the same levels [layers]. To modify a reference's level, open the References dialog box, double-click on the reference to open the Attachment Settings dialog box, and modify the Level setting. If a level is frozen, references on that level are not displayed.
  • A model cannot be attached to itself as a reference [self-reference].
  • Clipping masks cannot be used on references.
  • You can work with live nested references, but cannot turn off live nesting or control nest depth, except by using the Ignore Attachment when Live Nesting setting [Attachment Settings dialog box.]

Saving DWG with Attachments to v7 Format

You can save your DWG attachments in MicroStation V8 down to the v7 format. The reference attachments are automatically saved over to DGN. In MicroStation V8, it is not necessary to convert the attachments. You will either have to open each reference and do a Save As v7, or batch convert them all at once.

Chủ Đề