Introduction

This article describes how to use a MicroStation CONNECT Report to export DGN area feature  metrics and other information. By area feature  we mean DGN shape elements  complex shape elements  and ellipse elements.

Reports

Reports Icon

MicroStation CONNECT introduced Reports. Reports is an analytic tool. It extracts alphanumeric data (DGN or business data) from your DGN file, model, elements or elsewhere. When Item Types are in use, Reports can extract Item instance data attached to your DGN model or elements.

Visit our reports page for more information, and to see other examples of Reports in action. Don't forget to visit MicroStation's Reports help documentation.

Aggregate Reports

Aggregation adds calculations such as count and total to a report. The Area Aggregate Report article shows how to include aggregates in your report.

Define an Area Report

In a few simple steps, we'll define a MicroStation CONNECT Report that will write a CSV or Excel file. The file will contain multiple lines of data. Each line will contain the area feature metrics and other information.

Create a New Report Definition

In this example, we want to export shape element area measurements. The Report category is named Areas. The Report definition is named Area Features …

Area Report Definition 1

Add Area Elements

This is where the user interface is confusing. We want to report information about shape and other elements, which are a type of DGN element. The Report definition form is asking for a Search Location and Included Items. Leaving Search Location as it is (collect information from the active model in the active file), focus on Included Items.

From MicroStation CONNECT Update 15, the Included Items pane has an Options option button that lets you choose Include All Classes or Include Used Classes.

Included Items

If using a version of MicroStation earlier than Update 15, that option does not appear. You must place at least one instance of a cell in the active DGN model to continue defining your report.

The form seems to be asking you for an Item Type. If you click that option, you are taken to a new anonymous form having an option button Include these Item Types. Don't give up! Click that button to find that you can also choose DGN Elements. Expand that option to see a list that may contain Shapes and Ellipses. I write 'may contain' because that option won't show if there are no shape or ellipse elements in your DGN model! Click Shapes and Ellipses to add those Item Types to your Report …

Report Definition: Add Area Elements

Add Columns to the Report

Right-click the Report definition and choose Add Columns …

Area Report Definition 2

Here we've added a column named Element Description that describes the DGN element and other information specific to area features …

Area Report Definition 2a

Your Area Report is ready! Click the Preview Results button …

Area Report Definition 6

More Columns

Your Report definition is adaptable. As shown above, you can add a Level Name column to the Report, and other columns that concern area features …

Area Report Definition 7

The above Report harvests the area of each shape or ellipse.

Export Formats

Send your Area Report to a CSV file …

Element ID,Element Description,Perimeter,Area,Level Name
3490,Circle,0.539m,0.023 Sq.m,Areas type 2
3492,Shape,0.659m,0.018 Sq.m,Areas type 2
3493,Shape,0.733m,0.033 Sq.m,Areas type 2
3496,Ellipse,0.537m,0.022 Sq.m,Areas type 3
3497,Shape,0.723m,0.034 Sq.m,Areas type 3
3498,Shape,0.695m,0.022 Sq.m,Areas type 3

 …or to an Excel file …

Area Report Exported to Excel

As shown in the CSV report above, the area data is written by default using MicroStation's master units label as the suffix (in this example, Sq.m for meters). The decimal precision is the default three decimal places. You can write an undecorated value by choosing Label Format MU instead of Use Active Settings. You can adjust the number of decimal places using the Accuracy option.

Here's the CSV result when we omit the area units label and reduce decimal precision to two …

Element ID,Element Description,Perimeter,Area,Level Name
3490,Circle,0.54m,0.02,Areas type 2
3492,Shape,0.66m,0.02,Areas type 2
3493,Shape,0.73m,0.03,Areas type 2
3496,Ellipse,0.54m,0.02,Areas type 3
3497,Shape,0.72m,0.03,Areas type 3
3498,Shape,0.70m,0.02,Areas type 3

Example DGNLib

Design Library file ReportExamples.dgnLib contains the Report definition described here. It is available, along with a sample CSV file and Excel file. More information here.

Contributors

I am indebted to Bentley Systems staff member David Trejo-Rodriguez who posted the original hint on which this article is based, and also to Krister Surell, an independent developer at surell consulting ab. They both contribute regularly to the MicroStation Forum.