civilpy.general.bentley package
Submodules
civilpy.general.bentley.projectwise module
This script provides a library for interacting with the native ProjectWise API (dmscli.dll, dmawin.dll) from Python.
It includes a PW_SESSION context manager to handle safe login/logout, and functions for building an in-memory map of the project structure for fast lookups.
- class civilpy.general.bentley.projectwise.PW_SESSION(datasource_name='OhioDOT-pw.bentley.com:OhioDOT-pw-02')[source]
Bases:
objectA context manager to handle ProjectWise API login and logout.
- Usage:
- with PW_SESSION() as s: # Defaults to the ODOT datasource
# Your PW API calls go here pass
- civilpy.general.bentley.projectwise.build_project_map(max_depth=4)[source]
Builds an in-memory map of the ProjectWise folder structure for fast lookups.
- civilpy.general.bentley.projectwise.display_project_properties(properties)[source]
Nicely prints the dictionary of project properties.
- civilpy.general.bentley.projectwise.get_project_properties(project_id)[source]
Selects a project and extracts a dictionary of its key metadata.
- civilpy.general.bentley.projectwise.get_pw_path()[source]
Finds the ProjectWise installation path by searching the Windows Registry.