We’re pleased to introduce Python Assistant in MicroStation 2025, a powerful new feature designed to make automation and tool creation more accessible than ever. Whether you're just beginning your scripting journey or you're a seasoned user looking to accelerate your workflow, Python Assistant is here to help.
Below is a categorized list of prompts to help you get started and make the most of Python Assistant for learning and productivity.
NOTE: All items below are "Prompts" (linked or not) that you can Copy and Paste directly into the MicroStation Python Assistant.
Can you write a script which defines a new text style with specific font, height, width, color, and spacing parameters? | Can you write a script which modifies the content of a selected text element? |
Can you write a script which creates a distance constraint between two planar faces in 3D? | Can you write a script which implements a tool to create a polyface mesh (mesh with facets defined by points) based on user-clicked points defining each facet? |
Can you write a script which creates a new named group and adds all currently selected elements to it? | Can you write a script which performs a flood operation from a user-clicked point to identify a closed boundary and create a shape element representing that area? |
Can you write a script which reads all ECInstances attached to a selected element and prints their class names and property values? | Can you write a script which defines a new Item Type library and adds Item Type definitions with various property types (text, number, boolean)? |
Can you write a script which implements an interactive tool to copy selected elements from a base point specified by the user? | Can you write a script which implements an interactive tool to scale selected elements relative to base point using a scale factor derived from user input? |
Can you write a script which prompts the user to select a cell library name and cell name, then places that cell interactively? |
Can you write a script which attaches another DGN file as a reference attachment, prompting the user for the file and attachment settings (model logical name, and scale)? |
Can you write a script which generates a PDF plot of the current view? | Can you write a script which saves the contents of the currently active view window to an image file (e.g., PNG, JPG, TIFF) with specified resolution? |
Can you write a script which selects all elements of specific type (e.g., all Text Elements or all Cell Elements) in the active model? | Can you write a script which selects all 3D solid or surface elements whose volume falls within user-specified range? |
Can you write a script which implements an interactive tool allowing the user to select text element and edit its content in a dialog box? | Can you write a script which displays a non-modal PyQt window within MicroStation showing the current time, updating every second? |
Feel free to explore these resources and start your journey with Python Assistant today! If you have any questions or need further assistance, you can reach us through the following channels:
Python: Documentation | API Presentations | FAQs | GitHub | Samples | Wikis | Blogs