• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Automated Areas & Edge Length Display

Scheduled Pinned Locked Moved Newbie Forum
sketchup
10 Posts 3 Posters 806 Views 3 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.
  • O Offline
    ozftw
    last edited by 20 Mar 2011, 07:52

    Hi there,

    I'm currently undertaking a project based on the development of a small-scale housing estate - approximately 500 lots. I would like to be able to display the area of each plot, and the length of each bounding edge, without having to use SketchUp's text tool over and over. I have looked through the Plugin Index and flicked through a few pages of the forums but have not been able to find quite what I need for this.

    Are there any plugins to automate the process of annotating surfaces with their respective areas and boundary lengths? Or is there an in-built feature in SketchUp to do so?

    Any help would be much appreciated.

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 20 Mar 2011, 12:14

      There's my old AreaFormat http://forums.sketchucation.com/viewtopic.php?p=12808#p12808

      TIG

      1 Reply Last reply Reply Quote 0
      • O Offline
        ozftw
        last edited by 20 Mar 2011, 13:20

        I tried that script - I was only able to use it to format existing annotations that I had already created manually, rather than the script automatically creating its own annotations based on surfaces/edges I have selected. Was I using it wrong? I'm using SU Pro v6.0.515 if that makes any difference.

        1 Reply Last reply Reply Quote 0
        • T Offline
          TIG Moderator
          last edited by 20 Mar 2011, 15:22

          If you read the instructions it only works on Text tags you have added to a face that is reporting their 'Area' [the default 'string' of any Text added that is pointing directly to a face].
          So if you simply add such Text to each area and then select them all you can reformat them into say 'acres' using that tool...
          To get a face's perimeter you can select the face with double-click so it includes its edges, then immediately shift+ctrl click on the face to deselect just the face... and Entity Info then reports its perimeter's length [and number of edges].
          To find the length of one side, you just select the one line and Entity Info reports its length... OR you can add Text that is pointing at the line and by default its text will display the line's length.
          All areas and lengths added as text are in your current units as set in Model Info > Units.
          The AreaFormat tool simply takes the selected text that is already displayed in an 'area' format and turns it into your chosen units - e.g. acres... It is not an AreaTag tool - I still have that on my to-do list...

          TIG

          1 Reply Last reply Reply Quote 0
          • O Offline
            ozftw
            last edited by 20 Mar 2011, 15:44

            I was hoping there would be an easier way to do it than using the entity information/text tags manually for each of some 500 lots - not to worry! Thank you for your time and assistance anyway πŸ˜„

            1 Reply Last reply Reply Quote 0
            • T Offline
              TIG Moderator
              last edited by 20 Mar 2011, 17:58

              This one liner adds the area of any faces in a selection, each at the face's center; units=acres to 3dp on layer 'ACRE'.

              m=Sketchup.active_model;s=m.selection;fs=[];s.each{|e|fs<<e if e.class==Sketchup;;Face};fs.each{|f|a=sprintf("%.3f",f.area*0.000000159422507907)+'acres';t=m.active_entities.add_text(a, f.bounds.center);t.layer=m.layers.add('ACRE')}
              
              

              Select your faces [other things like edges are ignored] and copy paste this into the Ruby Console + <enter>. You should them get the acreage placed on each face as text in the format "1.234acres"

              TIG

              1 Reply Last reply Reply Quote 0
              • O Offline
                ozftw
                last edited by 20 Mar 2011, 23:05

                Excellent, just what I was looking for! This will save me bundles of time, thank you for your help πŸ˜„

                1 Reply Last reply Reply Quote 0
                • M Offline
                  mk11
                  last edited by 10 Nov 2011, 13:18

                  I need the exact same thing but without the acres calculation. I tried manipulating the code with strange results πŸ˜„ Would you be so kind to re-post the code just for displaying sqft for each face?
                  Thx very much

                  Marc Kleinmann
                  SU Pro 2015
                  Mac & Win

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TIG Moderator
                    last edited by 10 Nov 2011, 16:15

                    Areas are returned in sq" so
                    f.area*0.000000159422507907
                    turns it into acres.
                    To turn sq" as sq' use
                    f.area*0.006944444444444444
                    Also remember to change
                    m.layers.add('ACRE')
                    to
                    m.layers.add('SQFT')

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      mk11
                      last edited by 11 Nov 2011, 02:55

                      TIG
                      Thanks a lot for your help.

                      Marc

                      Marc Kleinmann
                      SU Pro 2015
                      Mac & Win

                      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