💡 LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
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 true
The 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?
Advertisement