Skip to content

Get DGN Info ​

Reads information from a Bentley MicroStation DGN file — text, title‑block cells and their tag values, reference attachments, levels, and drawing extents. No MicroStation installation or licence is required; the file is read directly, so this task can run in parallel across many drawings at once.

Purpose ​

Use this task when a workflow needs to inspect a DGN before acting on it — for example, to read title‑block metadata (drawing number, revision, status) from a cell, to confirm a border reference is attached and resolvable before publishing, to enumerate levels, or to obtain the drawing extents used when exporting to PDF. It pairs naturally with the DGN Export task: run Get DGN Info first to make decisions, then export.

Inputs ​

FieldTypeRequiredDescription
File PathTextYesFull path to the DGN file to analyse.

Outputs ​

NameDescription
TextsAll visible text strings found in the drawing.
TextCountNumber of text strings.
CellsCell placements (e.g. title blocks), each with its name, level, position and tag values.
CellCountNumber of cell placements.
AllTagsA flattened list of every tag name/value pair across all cells — useful for reading title‑block metadata directly.
AllTagCountTotal number of tag values.
RefsReference (external file) attachments, including the stored file name, path, and clip boundary information.
RefCountNumber of reference attachments.
MissingRefsReference attachments that have no stored path or file name.
HasMissingRefsTrue if any reference has no stored path or file name.
LevelsLevel definitions found in the file, with their IDs and names.
LevelCountNumber of levels.
DesignRangeThe drawing extents (overall geometry bounds) of the main file, in drawing units.
DesignRangeValidTrue if a design range could be computed (the file contains geometry).
ReferenceRangesFor each reference attachment, the extents of the referenced border file (resolved one level), with whether the file was found on disk.
ReferenceRangeCountNumber of reference ranges reported.
MissingReferenceFilesReference attachments that were listed in the drawing but could not be located on disk.
HasMissingReferenceFilesTrue if any referenced file could not be located on disk.

Notes ​

  • Title‑block metadata is most easily read from AllTags, or from a specific cell in Cells. Tag values typically hold fields such as drawing number, revision and approval status.
  • Reference borders (an external DGN attached as the sheet border) are reported in Refs and ReferenceRanges. The reference range is the border file's own extents, which the DGN Export task uses to clip each sheet.
  • Missing references (HasMissingRefs / HasMissingReferenceFiles) let a workflow stop early, or notify, when a drawing depends on files that are not present.

Tentech