Skip to Main Content
Need Support? Let’s guide you to the right answer or agent.
Status Needs review
Categories Programming
Created by Guest
Created on Jun 29, 2026

Python should have native access to a workspaces associated dgnlib levels and elements

When working on a custom tool for my office, I found a bit of a roadblock using MicroStation Python. I went to create a level selection list so the user could specify what level they wanted to place the symbol or element being generated on. I understand this could be accomplished by changing the attributes in the ribbon, but for many users it is more intuitive to have the selection list in the tool they are working in. However, in trying to create this I found that the MicroStation Python API cannot access the levels in the workspace's associated dgnlib. It can only see the levels in the active DGN, which if there is nothing in the file, it only populates "default" in the list.

using the Python AI Assistant I tried multiple workarounds but it just caused MicroStation to crash.

Through various searches and prompting of the AI, it was determined that MicroStation Python is unable to access dgnlib levels at this time. This is a function that VBA was able to do easily. Please add the ability for python to do this.