Python Manager


 

Python Manager is used to create, interact with, and edit Python scripts in the MicroStation Application. Python scripts are not embedded in the DGN file, they are stored separately in a .py file format.

Python Manager dialog can be accessed from the Utilities tab of either the Drawing or Modelling Ribbon as seen below.

image

 

Python Manager Dialog

Python Manager helps you create custom tools and automate workflows using the popular Python programming language. You can also create, interact with, and edit Python scripts in MicroStation. With Python Manager you can take advantage of the most popular and largest programming language resource community.

image

 

Python Manager has following options:

Opens the Create Python Project dialog which allows you to create a new project.

 

Opens the Open File dialog where you can select and load an existing project. Once loaded, the macros in the selected project appear in the Python Manager list box.

 

Allows you to add the folder in which you have stored your scripts. Once loaded, the macros in the selected project appear in the Python Manager list box.

 

Unloads or removes the selected project. When you remove, the macros are removed from the Python Manager and Macros dialog list box.

 

Runs or executes the selected Python scripts.

 

Allows you to select the editor to edit any Python scripts from the dropdown menu. You can choose from:

Python Editor - Allows you to edit the Python script in Python Editor.

Notepad - Allows you to edit the Python script in Notepad.

 

You can use any other editor available on your machine.

Note: All available editors will be displayed in the drop-down menu. For example: If you download Visual Studio Code, it will be visible in the drop-down menu.

 

Browse - Allows you to add an editor to the drop-down menu.

Note: Once the editor gets added to the drop-down menu, it cannot be removed.

 

 

Python: Documentation | API Presentations | FAQs | GitHub | Samples | Wikis | Blogs