sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Help creating a dimension

    Scheduled Pinned Locked Moved Developers' Forum
    1 Posts 1 Posters 654 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I Offline
      ittayd
      last edited by

      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?


      dims.skp

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement