MicroStation Python and DGN Elements

  • All Publications
  • Links
  • LA Solutions
  • Home
  • Books about Python
  • Article Index

  • Articles and Examples
  • DGN Files
  • DGN Models
  • DGN Elements
  • PyQt User Interface
  • Custom Tools
  • Python EC
  • Selection Sets
  • Named Groups
  • Config. Variables
LA Solutions
tel: +44 7768 232 536

Python

MicroStation Python
Python Development for MicroStation
Programming Examples

Search LA Solutions for articles about Python …


Article Index for DGN Elements

Bentley Programming Wiki Python Programming Wiki

DGN Elements
Title Link Comments
Get Line Vertices Get Line Vertices Use CurvePrimitive to get element data
Get Line String Vertices Get Line-String Vertices Get element data from DGN element internal structure
Get Zero-Length Lines Get Zero-Length Lines Shows how to build a list of elements with a list comprehension
Get Element at Offset Get Element at Offset
Count Elements by Type Count Elements by Type
Count Elements by Level Count Elements on Level
ChildElemIter Enumerate the contents of a complex element
PointElementInfo class PointElementInfo Data class used to convey point element information (e.g. Text origin, Cell origin)
Element Range Element Range element_range class used to compare one range (e.g. element range) with another range (e.g. fence range)
Place Cells along Line Place Cells along Line A tool with user interface to Place Cells along a Line
Create Centre Line Create Centre Line A tool with user interface to Create Centre Line Between Two Lines
Grouped Holes Find Grouped Holes How to find & examine grouped holes in a DGN model. Demonstrates mensuration and numeric formatting
Zoom Zoom to Element How to get an element's range and adjust a view to fit around that range
Drop Element Drop Element How to use DisplayHandler.Drop() to drop an element to its components

DGN Text
Title Link Comments
Text and TextBlocks Text, Text Nodes and TextBlocks TextBlocks are a class designed to help query, modify and create DGN text and text node elements
TextFields TextField Management Overview Overview of TextFields

Geometry
Title Link Comments
Curve Vector CurveVector A curve vector is a pure geometrical abstraction of a DGN element
CurveVector.WireCentroid CurveVector.WireCentroid() Clarification of method CurveVector.WireCentroid() return tuple
CurveLocationDetail CurveLocationDetail CurveLocationDetail provides information about a point on a line or curve
Associative Point AssociativePoint AssociativePoint stores a point and additional information that associates that point with another DGN object

DGN Element Mensuration
Title Link Comments
DGN Element Mensuration Measuring DGN Elements Linear, Shapes and Solids can be measured using mensuration idioms
DGN Element Mensuration using Engineering Content Measuring DGN Elements using EC Linear, Shapes and Solids can be measured using their Engineering Content (EC) properties
Formatting Lengths, Areas and Distances Formatting Values Format floating-point values resulting from 1D, 2D and 3D measurements

To see a full list of the modules delivered with MicroStation …

  • Open a Windows command window
  • Change to the Python folder, which is probably
    C:\ProgramData\Bentley\PowerPlatformPython\python
  • Key-in python -m pydoc modules

Trademarks

All trademarks are acknowledged. Trademarks may be registered in some jurisdictions.

Home
Home
Updated on 08-Sep-2026 Copyright © 2024…2026 Jon Summers