Display palette text¶
Display palette text¶
1# Loop through all the entities in the current block, displaying
2# palete text for large entities and hiding it from small entities
3SmallLength = 200
4if not impact.active_drawing.isNone():
5 lay = impact.active_drawing.active_layer
6 for ent in lay.active_block.entities:
7
8 # Non-geometric entities do not support the DisplayPaletteText property
9 if ent.geometric:
10 if ent.length >= SmallLength:
11 ent.display_palette_text = True
12 else:
13 ent.display_palette_text = False
14 impact.active_drawing.active_window.repaint()