Help creating a dimension
-
I'm using the latest Sketchup Make (2017). I have the attached model. What I'm trying to do is create a dimension that will be a duplicate of the one in the drawing. So I select the dimension and then in the console:
ss = Sketchup.active_model.selection #<Sketchup;;Selection;0x00000010cf1e20> dim = ss[0] #<Sketchup;;DimensionLinear;0x00000010d20680> dim2 = dim.parent.entities.add_dimension_linear(dim.start, dim.end, dim.offset_vector) #<Sketchup;;DimensionLinear;0x00000011dd0570> dim.hidden = true trueThe new dimension is not seen, nor selected when I do ctrl-A. Furthermore:
dim.start [#<Sketchup;;Vertex;0x00000011ac4a20>, Point3d(-4.19399, -68.4499, 42.0472)] dim2.start [#<Sketchup;;Vertex;0x00000011ac4a20>, Point3d(68.4499, 0, 42.0472)]So the two dimensions are attached to the same vertex, but with different points. The following doesn't work either:
dim3 = dim.parent.entities.add_dimension_linear([dim.start[0], dim.start[1]], [dim.end[0],dim.end[1]], dim.offset_vector) #<Sketchup;;DimensionLinear;0x0000001363d018> dim.start [#<Sketchup;;Vertex;0x00000011ac4a20>, Point3d(-4.19399, -68.4499, 42.0472)] dim3.start [#<Sketchup;;Vertex;0x00000011ac4a20>, Point3d(68.4499, 0, 42.0472)]Is this a bug or am I doing it wrong?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement