Entity Advanced Properties (Python)

Entity Advanced Properties (Python)
 1# This Example shows how use the Read/Write properties of the
 2# Advanced Tab of the Entity Inspector. Most of the properties
 3# Work for Lines, Arcs and Beziers.
 4# FilletRelief and FilletReliefExtension only work on Arcs.
 5
 6# Create a local variable for the output toolbox
 7ot = impact.gui.output_toolbox
 8
 9# Clear the output toolbox
10ot.clear()
11
12if not impact.active_drawing.isNone():
13
14    # Create a local variable for the active block
15    ab = impact.active_drawing.active_layer.active_block
16
17    # Get an Entity
18    entity = impact.gui.picker.get_entity( "Pick an Entity", False )
19
20    # Call the methods
21    entity.rule_height = 12.0
22    entity.bevel_side = ipBevelSide.bsRight
23    entity.zipper_side = ipBevelSide.bsRight
24    entity.holding_bridge_side = ipBevelSide.bsBoth
25    entity.combination_palette1_is_main = False
26    entity.combination_end_mode = ipCombinationEndMode.mainAtStart
27    entity.channel_offset_with = 3.0
28    entity.channel_offset_against = 2.5
29
30    if entity.entity_type == ipEntityType.etArc:
31        entity.fillet_relief = ipFilletRelief.frTriangular
32        entity.fillet_relief_extension = 3.0
33
34else:
35
36    ot.add("No Active Drawing")