Displaying Material Dialog¶
Displaying Material Dialog¶
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_drawing.active_layer may not always be the layer the button belongs to
7
8w = impact.gui.active_database_window
9
10if w.layer.display_select_material():
11 w.values.save("BOARDGRD", w.layer.material_name)
12