As a continuation to the topic, http://forums.sketchup.com/t/show-spot-height-elevation-labels, is there some straightforward way to automatically add a label in LayOut showing the spot elevation, i.e. z value, of a surface, e.g. as follows?
Good example of why data should stay with the model, not the presentation of the model - -of course you can use TIGS extension in SU, and display in LO [but Trimble never really sorted out displaying SU text and dims in LO] , or wait for trimble to make the LO API useful
@gsharp, using TIGâs plugin, how exactly would one bring the values into LO producing a label at a given location? Label should read e.g. â+10.88â. There should be just the label, no arrows, no boxes.
I didnât suggest it would be perfect, you could modify the script to remove those elements⌠but at least your tag would be integral with the model and therefore accurateâŚ
Yes, (relative) heights are always the biggest problem in construction.
In the Netherlands, we use the sign (+,-) to indicate the height relatively from the âfinished floor of the first levelâ
But when the client decides to go for a 1â thick solid wood and the fire department of the building committee adds a few cmâs to the slab, things get tricky.
To get proper results in Sketchup for exporting to IFC, you need to set a dummy component at the origin of the drawing axes. Because everything is nested, they all refer to that origin.
A simple Autotext Tag in LayOut would suffice (<Z>
), for relative,
a configurable one would be needed.
Data extracted from the model is then always guaranteed (just be sure to use the right model) and manually altering for representation ( adding signs etc) is not needed, reducing the fail factor.
@Anssi dynamic component for elevation might work, but it still would be sort of a âhackâ and you would need to place them in the Model, right?
Yes. My workaround involves a DC that looks like our standard elevation symbol and calculates a text attribute based on its blue (Z) position value, allowing the user to add a constant if the model origin is not at the actual âsea levelâ. Then, in LayOut , a label is set to display this attribute.
Usually (for me) slabs and floors are drawn as groups or new components and the attributes should be added, every time.
Do you have some sort of dummy floor component?
CuriousâŚ
Check this thread, also:
The original question is how to bring the elevation information into Layout, with TIGâs plugin I get the following. Neither the line nor word âHeightâ can be removed. Any suggestions, did someone have a workaround?
The end result, which I am trying to accomplish in LO is as follows, which shows two elevations, the original and the planned. (the SU model contains two surfaces for this purpose).
One, could of course do it manually, by hand, and input the results with text boxes.
The height tag code in the #heighttool_datum.RB
fileâs code can be readily edited⌠use Notepad++ on PC or on a MAC use a plaintext editor like TextWrangler or BBeditâŚ
Simply remove the 'Height:
'*** text from the strings in various placesâŚ
So in line#74
txt="Height: #{z}"
become
txt="#{z}"
Later on it also occurs in line#103 AND line #109 as:
e.set_text("Height: "+(e.point.z+@datum).to_l.to_s)
which becomes
e.set_text((e.point.z+@datum).to_l.to_s)
And then in line#127 AND line#184
t.set_text("Height: "+(t.point.z+datum).to_l.to_s)
becomes
t.set_text((t.point.z+datum).to_l.to_s)
You donât need to change line#61 as itâs a transitory message displayed at the cursor as you place the tagâŚ
To change the âleaderâ details you can edit the code - e.g. the offset âvectorâ can be [0,0,0], in line#42
@vec=[2,2,2]
becomes
@vec=[0,0,0]
OR to remove the leader lines/dot⌠line#82 AND #180
t.display_leader=true
becomes
t.display_leader=false
OR to remove the leader line #82 AND #181
t.leader_type=1
becomes
t.leader_type=0
OR to avoid just the âdotâ line#83 AND #182
t.arrow_type=2
becomes
t.arrow_type=0
For full details see here: Class: Sketchup::Text â SketchUp Ruby API Documentation
PS:
*** If you want to add a â+â to the start of the heightâs text, then consider replacing the text-string 'Height:
â with '+
â
The picked point is the origin of the Text object.
If thereâs a leader itâs the arrowhead.
My previous code showed how to avoid the leader.
The picked origin is the bottom-left of the text, not the center-left.
The text block varies as its size is zoom dependent.
You could recast the code to make a 3d-text labelâŚ
In some ways that is simpler - look up other examples - e.g. my 2Dtools > TextâŚ
Obviously we need to get the pointâs height !
Sorry TIG, didnât mean to drop you in itâŚ
looks like nothing can suppress your amazing talents
And thanks for confirming my advice wasnât misplaced
So if I understand correctly, the labels are added in the SketchUp Model.
Until certain features arenât implemented in LayOut, workarounds, extensions and hacks in SketchUp will always be needed. Simple basic information like heights, area and volume should be part of the dynamic-data-extracting combo of SketchUp and LayOut, IMO.
It may not apply for users that work alone, but in many cases, models are shared. Some need Area, some only Volume. If you import a (part of a) Model as reference and all the Metadata is there in a visible, personally styled âFace meâ label, be it organised by layers or scenes, many users would like to implement their own style. Some in LayOut, some in other programs.
We could wait for the LayOut API, but I would like basic stuff handled correctly, natively.
And yes, TIG (sh,c)ould be Prime-minister
What a bunch of steps that everyone has provided in this thread⌠Just surprised that there is no easy way of doing this with a plugin already made or that sketchup hasnât provided this easy option. Setting a datum height is a very common requirement for building designers.
A tool for this function is definately something that would be very useful.
I am looking to replicate the code variations listed above, thank you TIG.
I know very little about scripts. The rbz file that is currently downloadable does not appear the same in Notepad++ as listed.
Is there a way to achieve the same results with this file.
I place elevation marker components into my model and then add an autotext label in LayOut:
In section:
In plan:
No programming is involved, except that the marker is a dynamic component in order to format the text in meters in an otherwise millimeter-using model.
Very nice! Doesnât require Ruby code, but does require a dynamic component as you described back here, yes?
The âdynamicâ part is only about text formatting. I use millimeters with a high precision in my SKPs, and our standard requires spot heights in meters. The <coordinates(z)> autotext uses the units setting from the model.
Here, for comparison, labels using the autotext tag:
Numbers formatting for LayOut would be IMO a good feature request.
Curious, can you achieve the same result using âLive Componentsâ ?
would they be better? PS nice solution @Anssi