Repository navigation
Replies: 1 comment
|
Two things are getting in the way here (checked with ezdxf 1.4.5):
To resize an existing dimension, change its override and render it again: dim = msp.add_linear_dim(
base=(0, -20), p1=(0, 0), p2=(100, 0),
dimstyle="Standard",
override={"dimasz": 50, "dimtxt": 50},
)
dim.render()
entity = dim.dimension # the DIMENSION entity
# later: resize it
old_block = entity.dxf.geometry
ov = entity.override()
ov.update({"dimtxt": 10, "dimasz": 10}) # or ov["dimscale"] = 3 to scale everything
ov.commit()
entity.render() # rebuilds the geometry block
doc.blocks.delete_block(old_block, safe=False) # optional: drop the stale blockWith this the text height and arrow size in the rendered block go from 50 to 10, and setting If you want all dimensions to follow the dimstyle instead, leave |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I need to resize the annotation after it has been created, but this method doesn't work. Could you please provide some guidance? Thank.
All reactions