Adding a bridge¶
Adding a bridge¶
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 ent is not None:
11
12 # remove all existing bridges
13 ent.bridges.clear()
14
15 # Add a bridge, width 10mm, starting 100mm from the entity start,
16 # so the centre of the bridge will be 105mm along the entity.
17 ent.bridges.add(100, 10)