**%(#FF0000)[Autolabel has been updated in Sketchup 2015 to make this feature come true. ...and in a more elegant way to what is described below.
To find out more, see the release notes:
http://www.sketchup.com/products/sketchup-pro/new-in-2015]**
I've been thinking what the first scripts for LayOut would look like, assuming that LO is going the way of Sketchup by adding a Ruby API.
I've been having a go at AutoText, which is a time saver. I like autofill labels, but I don't always get the exact information I need, especially when there are nested elements involved.... So what if these are combined, with the Label text showing a specific quality of a specific part of the model that is being pointed at. What that particular quality would be dependent on the tool setting, which would best be scripted by the Sketchup community. Let's call it "AutoLabel" for now.
So it might work like this, for example:
[]1. I select the "Auto Label" tool, using the "Volume" setting
[]2. In the model viewport, I click on a component, which happens to be a solid. I click again to place the text end.
[]3. Voilla! The volume of the component is shown.
[]4. In the AutoLabel window pane, I select the units I want to use eg- sqm.
Explanation of window:
[]Focus - selects the target of the label, in situations where different levels of nesting might exist
[]Label Name - selects the labelling script to use (in this case, Volume)
[]Parameters - parameters as defined by the labelling script, which will affect the output.
[]Process/Auto - like the Sketchup Model render button. The autolabel scripts may take time to process, so would need a manual update option.
What this encourages is for information to be input into the model, and minimise the amount of typing and duplication within Layout. It also works well with the Information Modelling direction that Sketchup seems to be going in.
Where I think developers can get involved is in creating scripts that take a selected element within the model, processes it, then outputs the text to Layout. This would very much be Sketchup API scripting, more than LayOut. Just think of the text that can be returned by these scripts:
- Attribute values - All Sketchup elements have attributes. Select the attribute you want and go!
- Perimeter of face
- Volume
- Names of all Groups within a Group
- Number of bricks from volume
- Number of instances of Component within Model
- Mass of solid (calculated from volume and a density attribute)
- Material name
Any takers?