Bentley MicroStation Design Reader/Writer
FME can read and write files used by the Bentley® MicroStation and Intergraph Interactive Graphics Design System (IGDS).
Intergraph made public the specification for this file format, which they call the Intergraph Standard File Format (ISFF)1. This chapter assumes familiarity with this format.
Bentley MicroStation Design Product and System Requirements
Format |
Product |
Operating System |
||||
---|---|---|---|---|---|---|
Reader/Writer |
FME Form |
FME Flow |
FME Flow Hosted |
Windows 64-bit |
Linux |
Mac |
Reader |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Writer |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
XFM Features
Note that XFM features handled by the DGN V8 Reader/Writer represent a normalized form of XFM features. See the Bentley Map XFM Design format for an alternative object representation.
Format Information
Design files consist of a header, followed by a series of elements. The header contains global information including the transformation equation from design units to user coordinates, as well as the dimension of the elements in the file. Each element contains standard display information, such as its color, level, class, and style, as well as a number of attributes specific to its element type. For example, a text element has fields for font, size, and the text string in addition to the standard display attributes.
Individual design file elements must be less than a system-imposed maximum number of bytes. Complex elements solve this problem by physically grouping individual elements together into an object that will be manipulated as a whole. The FME transparently handles such complex elements as single FME features. This situation occurs when text elements are grouped together into a single complex element headed up by a text node, and when linear or polygonal features have more than 101 vertices (Microstation V7) or 5000 vertices (Microstation V8). Cells are complex elements used as symbols, and are treated as atomic entities by the FME.
Each IGDS file element may have one or more attribute linkages associated with it. The IGDS reader and writer support both user data and database linkages. (Note that the DGN V8 reader supports the interpretation of FRAMME linkages, but the writer does not.) The linkage values may be used to join elements with attributes stored in relational tables through the use of the Joiner or FeatureMerger FME Workbench transformers. Linkages may also be used to specify fill information for fillable IGDS area geometries such as Shape elements, and other application-specific data. (Note, however, that the igds_fill_color attribute will override any solid fill color linkage specification if both are present.)
Because Design files support three interpretations of units, the IGDS reader and writer must be told how to interpret the feature coordinate units and how they will be converted to and from Units of Resolution (UORs). The feature coordinate units may be interpreted as Master Units, SubUnits, or as raw UORs. These units are all relative to working coordinates. See the DGN V8 Assume Master Units Equal Working Units reader parameter for further details on DGN V8 reading.
In contrast, when writing to DGN V8 files, the writer ignores these settings from the workspace and adopts the settings as read from the seed file chosen. This means that if you want to do something special with the working units, you have to do that in the V8 seed file.
The IGDS reader and writer use symbolic names for the IGDS element types rather than the IGDS numeric values. This greatly simplifies element type specification.
The following table maps the supported IGDS element types to their corresponding FME feature igds_type
attribute value that is used by the IGDS reader and writer. Subsequent subsections describe the handling of each of these element types in detail.
IGDS Element Type |
FME igds_type |
---|---|
2, Cell header |
igds_cell |
3, Line 4, Line string 12, Complex string |
igds_point |
3, Line 4, Line string 11, Curve 12, Complex string 27, B-Spline curve 33, Dimension 36, Multi-line |
igds_line |
6, Shape 14, Complex shape |
igds_shape |
7, Text node |
igds_text_node |
11, Curve 12, Complex string |
igds_curve |
12, Complex string |
igds_complex_string |
14, Complex shape |
igds_complex_shape |
15, Ellipse |
igds_ellipse |
16, Arc |
igds_arc |
17, Text 37, Tag attribute |
igds_text |
7, Text node 17, Text |
igds_multi_text |
2, Cell header |
igds_solid |
2, Cell header |
igds_smart_solid |
35, Shared cell header |
igds_shared_cell |
18, Surface (V8 only) |
igds_surface |
19, Solid (V8 only) 23, Cone |
igds_3d_solid |
100, Reference attachment (V8 only) |
igds_xref |
39, DgnStore header (V8 only) |
igds_xfmstore |
105, Mesh |
igds_mesh |
106, Polygon collection |
igds_polygon_collection |
107, Non-geometric collection |
igds_nongeom_collection |
Design files can store custom data as elements and linkage attributes. One such case is the XML-based Feature Modeling (XFM) data associated with the Bentley Map application. The XFM data in design files represent an instance of XFM feature and property information as a part of a Bentley Map project. The Bentley Map project defines a schema for XFM features, and the properties of those features, as well as the domains for those properties among other things. The DGN V8 Reader/Writer has been enhanced to support reading and writing of XFM data stored in Design files. Care should be taken that transformation of XFM data does not violate the overall coherency with the Bentley Map project.
The FME reader detects the version of the source dataset (version 7 or 8) internally and handles it accordingly. There is no difference to users in terms of the feature type or attribute names of the elements.
The IGDS reader first reads the header information from the Design file being processed, and extracts the conversion parameters required to translate coordinates from internal IGDS UORs to ground units. These units are all relative to working coordinates. See the Advanced Reader Parameter Assume master units equal working units. It also determines the dimension of the input file.
It then extracts each individual element, one at a time, and passes it to the rest of FME for processing. Complex elements are extracted as single FME features. If a complex element contains an arc, then the reader automatically converts it to a linestring enabling it to be processed by all other readers and writers within FME. If the element had any attribute linkages attached to it, these are read and added as attributes to the FME feature being created.
If the reader encounters an element type it does not know how to process, it simply ignores it and moves on to read the next element.
DGN Version 8 also reads the models to which the features belong. All the models read retain their respective working units and global origin values.
Dataset
The value for the Reader Dataset is the file name of the IGDS file to be read. For example:
/usr/data/dgn/92b034.dgn
To create a new Design file, header information is obtained from an existing Design file, called a seed file. The IGDS writer first copies the seed file’s header information to the destination file, and then extracts the conversion parameters required to translate coordinates from feature coordinate units to internal IGDS UORs2. This header information includes type 68 FRAMME elements for V7 only, and type 100 external file reference elements. The IGDS writer uses the seed file to determine whether the destination file will be two-dimensional or three-dimensional. The V8 Design file writer also uses the seed file to set up the models which may have elements written to them.
Because seed files with a sufficient ground range and resolution may be difficult to obtain, the IGDS V7 writer allows seed parameters to be overridden in the mapping file. When a seed file with insufficient range available is used, the IGDS V7 writer will report that features were outside of the bounds of the seed file, and suggest values for the global origin and UOR/subunit/master unit ratios to use. FME can also automatically adjust the V7 Design file by setting Set Seed File Parameters to Yes. Note that this facility has been taken away from the V8 writer – it is no longer necessary since V8 has a much larger design plane than V7.
A cell library file may optionally be used by both V7 and V8 writer. Cell libraries contain named symbol definitions which can be used to depict point features. If a cell library is specified, the IGDS writer reads in all the cell definitions for later when cell features are output. The IGDS writer can use either 2- or 3-dimensional cell libraries, and will automatically convert the cell definitions to be of the correct dimension for output.
The IGDS writer then outputs each FME feature it is given. Most often, a single FME feature corresponds to a single IGDS element. If any linkages are specified for the element, they are also output. However, some of the IGDS element types cause several elements to be output as a complex unit, with the complex bit turned on. This occurs when a multi-line text object, a cell, or a closed shape or linear feature with more than 101 coordinates (5000 coordinates in V8) is output. The IGDS writer hides all of the details of complex element output.
The IGDS writer can be configured to do one of two things with linear features that have exactly two points. By default, a type 3 line element will be created for such features. However, if Two Point Line Output is set to Type 4 Elements, then a type 4 linestring element will be created for the two-point linear feature.
Dataset
The value for the Writer Dataset is the file name of the output IGDS file.
Workspaces in Version 7 and Version 8
A workspace originally created using a V8 seed file can only be used to write to V8. A workspace originally created using a V7 seed file can be used to write to both V7 (although there will be a difference in the way destination feature types are handled) or V8. Two additional limitations are applied to V8:
- Limitation of level numbers from 1 to 63 will also be applied to V8.
- Feature types will always be generated as level numbers just like V7, but those level numbers will be treated as level_names by V8. For instance, if you tried to write to level_number 3, the level would be written as level number 3 for V7, but the level name would be written as “3” for V8 (when its number may or may not be 3). This can be overcome by specifying values for igds_level_name and igds_level.