Layer revision properties

Layer revision properties
 1# This example displays the various properties
 2# of a database layer revision object.
 3
 4# Get the output tool box and clear it.
 5otb = impact.gui.output_toolbox
 6otb.clear()
 7
 8# Get the database item of the current active drawing.
 9databaseitem = impact.active_drawing.databaseitem
10
11# For each of the database layer.
12for layer in databaseitem.layers:
13    otb.add("========== Layer: " + layer.name + " ==========")
14
15    # Iterate each of the revisions for this layer.
16    for revision in layer.revisions:
17        otb.add("====== Revision: " + str(revision.number) + " =====")
18        otb.add("Layer number: " + str(revision.layer_number))
19        otb.add("Has geometry: " + str(revision.has_geometry))
20        otb.add("Key: " + str(revision.key))
21        otb.add("Created: " + str(revision.created_date_time))
22        otb.add("User name: " + str(revision.user.full_name))
23        otb.add("Comments: " + str(revision.comments))
24        otb.add("File location: " + str(revision.file_location))
25        otb.add("")
26    otb.add("")