I can add
DimensionLinear objects along 2D edges by passing an offset vector like
[cos(PI/2 + phi), sin(PI/2 + phi), 0], where
phi is the angle that the edge makes with the x-axis, but I can’t figure out how to do the same thing in 3D.
I was thinking that something like
entities = Sketchup.active_model.entities edge = entities.add_edges([0, 0, 0], [10, 10, 10]) offset_vec = edge.line dim_linear = entities.add_dimension_linear(edge.start, edge.end, offset_vec)
would do the trick, but it doesn’t… When I checked the
text attribute of
dim_linear I got
"0.00 m", which is clearly wrong.
What am I missing here?