Adding a bridge (Python)¶
Adding a bridge (Python)¶
1# Check that there is an active drawing
2ad = impact.active_drawing
3if not ad.isNone():
4
5 # create a line entity
6 ab = ad.active_layer.active_block
7 ab.move_ad(0, 0)
8 ent = ab.line_ad( 200, 0 )
9
10 if not ent.isNone():
11
12 # remove all existing bridges
13 ent.bridges.clear() # Add a bridge, width 10mm, starting 100mm from the entity start,
14 # so the centre of the bridge will be 105mm along the entity.
15 ent.bridges.add( 100, 10 )