MicroStation Python

  • 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
  • Engineering Content
    (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 …

Development Environment

Bentley Systems introduced Python as a development tool with MicroStation 2024. MicroStation Python includes several Python modules and some MicroStation-specific extensions.

MicroStation provides the Python Manager. You'll find it in the Utilities tool box. It's the gateway to your Python projects.

Maximum Python File Name Length

Although it's not mentioned in Python help, the maximum length of a MicroStation Python file name is 48 characters, including the file extension.

A Python file name having more than 48 characters will crash MicroStation without warning.


MicroStation Python Article Index

Bentley Programming Wiki Python Programming Wiki

MicroStation Python
Title Link Comments
Bentley Programming Wiki Python Programming Wiki Examples by mostly Bentley Systems staff
DGN Utilities DGN Utilities Utilities for Analysing DGN objects
List Directories List Directories Utility for displaying a folder structure
Version Info Version Info Version Info
Class Selector Choose a class by name Demonstrates Python match, case and __qualname__

Python
Title Link Comments
Class Selector Choose a class by name Demonstrates Python match, case and __qualname__

Configuration Variables
Title Link Comments
Configuration Manager Example Shows how to use Python Configuration Manager Demonstrates Python ConfigurationManager
Get Report Folder Get Report Folder fom MS_REPORT_OUT

Python Installation

MicroStation 2026 installs Python for you. As with VBA, you don't need to install anything else. MicroStation provides the Python Manager, which you will find in the Utilities tool set.

Python Development Environment
Install Python MicroStation 2026 installs Python for you. Python Manager appears in the Utilities menu
MicroStation installs additional Python modules See Python help for details

Books about Python

Books about Python
Fluent Python O'Reilly Media A thorough guide to the mechanics of Python
Geometry for Programmers Manning Publications A great introduction to the maths of vectors, matrices and some dedicated Python modules
Math for Programmers Manning Publications Takes an alternative way to CAD to analyse multi-dimensional data

Development Tools

Development Tools: Visual Studio Code, Jupyter, GUIs and Windows
Title Article Location Comments
Visual Studio Code Visual Studio Code Microsoft freeware
Jupyter Jupyter Interactive development environment for notebooks
Message Center for Developers MicroStation Message Center See examples provided with MicroStation Python
User Interface: PyQt vs. Tkinter Comparing PyQt with Tkinter Two different GUI toolkits: see examples provided with MicroStation Python

Third-Party Libraries

There is a huge range of packages that enhance the Python ecosphere. Python.org provides a search tool to help you find a package.

Some packages are installed by MicroStation, so you don't have to. They are mentioned in the help section API Versions.

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 12-Sep-2026 Copyright © 2024…2026 Jon Summers