Automated Areas & Edge Length Display
-
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.
-
There's my old AreaFormat http://forums.sketchucation.com/viewtopic.php?p=12808#p12808
-
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.
-
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... -
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
-
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"
-
Excellent, just what I was looking for! This will save me bundles of time, thank you for your help
-
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 -
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
Thanks a lot for your help.Marc
Advertisement