sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    [REQ] Automatic Labels or Dimensions ?

    Scheduled Pinned Locked Moved Plugins
    14 Posts 4 Posters 1.0k Views 4 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.
    • BoxB Offline
      Box
      last edited by

      If you mean like this, then, in a word, Oui.
      Edit, but if you mean multiple in one click, the answer is longer.


      Oui.JPG

      1 Reply Last reply Reply Quote 0
      • pilouP Offline
        pilou
        last edited by

        @ Box
        Wanted
        I select some nude straight lines : Then call a plugin (if existing)
        result : all each line selected have now a Dimension or a "lablel of a dimension" !
        (following how the plugin is made)

        Frenchy Pilou
        Is beautiful that please without concept!
        My Little site :)

        1 Reply Last reply Reply Quote 0
        • BoxB Offline
          Box
          last edited by

          I realised after I posted that you wanted auto on multiple Lines.
          I can't think of anything that will do that just now.

          1 Reply Last reply Reply Quote 0
          • sdmitchS Offline
            sdmitch
            last edited by

            @unknownuser said:

            Does this yet existing for a selection of straight lines in one click ?

            http://sketchucation.com/forums/download/file.php?id=115086

            True dimensions have a "dynamic" quality that a plugin's add_text can not duplicate. However, if the length label you would get from selecting the midpoint of a line is sufficient, then that can easily be done.

            mod = Sketchup.active_model
            ent = mod.active_entities
            sel = mod.selection
            begin
             edge=sel.first
             spt=edge.start.position
             ept=edge.end.position
             mpt=Geom;;Point3d.linear_combination(0.5,spt,0.5,ept)
             dim=edge.length.to_s
             grp=ent.add_group;ge=grp.entities
             txt=ge.add_text(dim,mpt,[0.5,0.0,0.5])
             txt.leader_type=1
             txt.arrow_type=3
             sel.remove edge
            end until sel.empty?
            
            

            Nothing is worthless, it can always be used as a bad example.

            http://sdmitch.blogspot.com/

            1 Reply Last reply Reply Quote 0
            • pilouP Offline
              pilou
              last edited by

              Cool for the effort... ☀
              But seems there is a glitch
              and very difficult to input on the ruby console without carriage return to line!

              Error; #<SyntaxError; (eval); compile error
              (eval); syntax error, unexpected tIDENTIFIER, expecting $end
              ... ent = mod.active_entities sel = mod.selection begin edge=se...
                                            ^>
              (eval)
              

              Maybe errors come from the difficulties to input inside the ruby console!

              Frenchy Pilou
              Is beautiful that please without concept!
              My Little site :)

              1 Reply Last reply Reply Quote 0
              • sdmitchS Offline
                sdmitch
                last edited by

                Sorry about that. I always use Ruby Web Console to create and run short plugins such as this one. Here it is as a "one" liner.

                mod=Sketchup.active_model;ent=mod.active_entities;sel=mod.selection;mod.start_operation "auto label";begin;edge=sel.first;if edge.is_a?(Sketchup;;Edge);spt=edge.start.position;ept=edge.end.position;mpt=Geom;;Point3d.linear_combination(0.5,spt,0.5,ept);dim=edge.length.to_s;grp=ent.add_group;ge=grp.entities; txt=ge.add_text(dim,mpt,[1,0,1]);txt.leader_type=1;txt.arrow_type=3;end;sel.remove edge;end until sel.empty?;mod.commit_operation
                

                Just for fun, here is an attempt at creating a "dimension". The problem is that it is so view dependent.

                mod=Sketchup.active_model;ent=mod.active_entities;sel=mod.selection;mod.start_operation "auto dim";begin;edge=sel.first;spt,vec=edge.line;ept=edge.end.position;dim=edge.length.to_s;vec.length=edge.length/2.0 - dim.length;grp=ent.add_group;ge=grp.entities;ge.add_line spt.offset([0,0,1]),spt.offset([0,0,6]);ge.add_line ept.offset([0,0,1]),ept.offset([0,0,6]);txt=ge.add_text(dim,spt.offset([0,0,5]),vec);txt=ge.add_text("",ept.offset([0,0,5]),vec.reverse);txt.leader_type=1;txt.arrow_type=3;sel.remove edge;end until sel.empty?;mod.commit_operation
                

                Nothing is worthless, it can always be used as a bad example.

                http://sdmitch.blogspot.com/

                1 Reply Last reply Reply Quote 0
                • G Offline
                  glro
                  last edited by

                  @unknownuser said:

                  That is curious that this follow don't exist in native and difficult to make in Script! 😄

                  [attachment=0:1pedr9ym]<!-- ia0 -->aacurious.jpg<!-- ia0 -->[/attachment:1pedr9ym]

                  Nothing in ruby

                  But TIG gave the basic idea to make it: you store a dimension as a component, then you stretch and move it according to the end position of the edge extremities

                  I used his idea in this plugin
                  http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=55714%26amp;p=506825%26amp;hilit=multiple+dimension+tool#p506825

                  it should be possible to adapt it the way you want it to work, by pre selection

                  1 Reply Last reply Reply Quote 0
                  • pilouP Offline
                    pilou
                    last edited by

                    @Giro
                    Missed this one! 😳
                    I will exam it! 😄

                    Edit: ok I use it ! It's a cool plug but you must click on each thing! 😄

                    If I have 1000 segments separated i must make 2 * 1000 clicks !
                    Or I miss something as you speek about a "pre selection"

                    Ps And works only on the horizontal plan ! So not so good for my vertical segments! 😉

                    aasegment.jpg

                    Frenchy Pilou
                    Is beautiful that please without concept!
                    My Little site :)

                    1 Reply Last reply Reply Quote 0
                    • pilouP Offline
                      pilou
                      last edited by

                      Bravo! ☀
                      Now That is prefect for the first one! 👍
                      Second is more funny 😄

                      aaperfect.jpg

                      Excellent! 👍
                      aatriangle.jpg

                      That is curious that this follow don't exist in native and difficult to make in Script! 😄

                      aacurious.jpg

                      Frenchy Pilou
                      Is beautiful that please without concept!
                      My Little site :)

                      1 Reply Last reply Reply Quote 0
                      • G Offline
                        glro
                        last edited by

                        i know this plugin doesn't exactly meet the need

                        i just suggested that it would be possible to adapt it, by retrieving the end points of a selection of edges, and adapting a dimension/component to them, in bulk

                        i plan to update the plugin for altitudes, not for vertical edges

                        do you really have 2000 edges to dimension? or is it an hypothesis...

                        1 Reply Last reply Reply Quote 0
                        • pilouP Offline
                          pilou
                          last edited by

                          it's a little part! 💚
                          So no an hypothesis! 🤓

                          http://sd-2.archive-host.com/membres/up/157426003260176292/11.jpg

                          Frenchy Pilou
                          Is beautiful that please without concept!
                          My Little site :)

                          1 Reply Last reply Reply Quote 0
                          • G Offline
                            glro
                            last edited by

                            @unknownuser said:

                            it's a little part! 💚
                            So no an hypothesis! 🤓

                            here is a plugin that does what you want

                            a video
                            https://dl.dropboxusercontent.com/u/52719814/videos/multiple_edge_dim_tool.webm

                            only vertical edges


                            mult edges dim tool

                            1 Reply Last reply Reply Quote 0
                            • pilouP Offline
                              pilou
                              last edited by

                              Cool one! ☀

                              Frenchy Pilou
                              Is beautiful that please without concept!
                              My Little site :)

                              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