Display Select Material (Python)

Display Select Material (Python)
 1# Use the impact.gui.active_database_window when writing scripts that
 2# work inside database windows. These can include scripts for buttons
 3# on a database window to read/write values into the database.
 4# Avoid using impact.active_drawing inside database windows because
 5# the database values are sometimes cached when using database windows
 6# and the impact.active_layer may not always be the layer the button belongs to
 7w = impact.gui.active_database_window
 8
 9if w.layer.display_select_material():
10
11    w.values.save("BOARDGRD", w.layer.material_name)