The simple Python script below fails to create a dimension line if the line:
is included. The error message is:
‘DimensionStyle’ object has no attribute ‘TextAlignment’
Without this line it works fine but the text is above the dimension line rather than inline as I wanted. What happened to the the DimStyleTextAlignment attribute? I am using the latest version of Rhino6. This also fails in the same way if I try using rhinocommon calls. I think I must have missed the memo about this.
import rhinoscriptsyntax as rs x0 = 182.9; x1 = 247.7 y0 = 592. Xz0 = 0.0 rec_dims = rs.AddDimStyle('rec_dims') rs.DimStyleArrowSize(rec_dims, 2.0) rs.DimStyleExtension(rec_dims, 1.5) rs.DimStyleTextHeight(rec_dims, 1.5) rs.DimStyleTextAlignment(rec_dims, 3) begin = x0, y0, Xz0 end = x1, y0, Xz0 point = x0, y0-2, Xz0 dl = rs.AddAlignedDimension(begin, end, point, rec_dims)