Layer revisions (Python)

Layer revisions (Python)
 1# This example displays the various properties
 2# of a database layer revisions object.
 3
 4# Get the output tool box and clear it.
 5otb = impact.gui.output_toolbox
 6otb.clear()  # Get the database item of the current active drawing.
 7databaseitem = impact.active_drawing.databaseitem
 8
 9# For each of the database layers within the database item
10# display the layer name along with total number of revisions
11# and then the number of revisions which contain geometry changes.
12for layer in databaseitem.layers:
13    otb.add("Layer: " + layer.name)
14    otb.add("Revision Count: " + layer.revisions.count)
15    otb.add("Revisions with geometry: " + layer.revisions.geometry_revision_count)
16    otb.add("")