Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Window label with elevation to project zero?

Anonymous
Not applicable
Hello

I would like to script a window label that would indicate the elevation of window sill relative to project zero.

So far I have succeeded in making it work as long as the wall base is the same as the story base, like this:

str("%+1.3m",AC_GLOB_ELEVATION+GLOB_HSTORY_ELEV)

But I don't know how to make the label read the elevation of the WALL base relative to story base elevation.

Does anyone know how this could be achieved, or if it's just impossible?
17 REPLIES 17
Ben Cohen
Advocate
Try combining it with

ac_sill_to_anchor_level - length

I don't think these variables are available in version 10.
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Frank Beister
Moderator
I gave it a try. I tried this dump lines in an empty dw-marker:
text2 0,2.5,WIDO_RSIDE_SILL_HEIGHT
text2 0,2.0,GLOB_ELEVATION
text2 1,1.5,WALL_POSITION[3]
text2 0,1.0,GLOB_HSTORY_ELEV
text2 1,0.5,ac_glob_elevation
text2 0,0.0,ac_wall_elevation
Don't forget to create for each ac_xxx-parameters an entry in the parameter list, if they are not listed as blue parameters anyway!

This should do it for you:
baseheight = WALL_POSITION[3] + ac_glob_elevation
Inside the window script it would be
baseheight = WALL_POSITION[3] + GLOB_ELEVATION
But this does not work in markers. They need to use the ac_glob_elevation, because this special parameter works as pass-through of the GLOB_ELEVATION value of the window into the marker script.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
F.Beister, I tried your code and the only variables that return anything other than zero are ac_glob_elevation and GLOB_HSTORY_ELEV.

The same goes for Ben's ac_sill_to_anchor_level: zero.

I am beginning to think it is a question of program version.

We do have one workstation at the office with 13 installed. I will have to give it a try to see what difference it makes.
Frank Beister
Moderator
If you like, send me the marker. I will have a short look on it.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Frank Beister
Moderator
Sorry I was wrong. Twice.

You work on AC10, I tried with 14, you asked for marker, I tried label.

Labels seem to work, markers not.

Same object, AC11 it does not work, AC 14 is fine with the following formula, as posted above:

WALL_POSITION[3] + ac_glob_elevation

Seems you need to upgrade. So far I haven't seen a workaround.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
OK, thanks for the confirmation!
I guess we'll make do with the old version until we see what 15 has to offer. So far the upgrades since v.10 have been lackluster from the point of view of our needs and return for investment, and we decided to rather save the money... Well this is going off topic. Anyway, thanks for all the help!
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Just a small clarification (after you solved the problem alright...).

The following isn't considered as a bug. Windows inherit the home storey from the containing wall. All the rest can be calculated based on elevation just as you did.
F. wrote:
I have lost a lot of time in finding the following bug:

"HOME_STORY, used in marker objects, always returns the home story of the wall, not of the window. A wall, visible over three stories can have in each story other openings. The markers of the openings return always the home story of the wall."

Maybe there are more bugs in this ambient. Just keep a focus on this and try it in further versions. Just a hint.
Regs,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Frank Beister
Moderator


The picture shows a multiple story wall in AC11 and AC14. Left is a window in basement, right in the 1st floor. The wall is 0.5m above project zero. each window is labeled by a marker (top) AND a label (bottom), each with the same gdl code:
s=0.5*GLOB_SCALE/100*1.15

text2 0,6*s,"GLOB_CSTORY_ELEV="+str("%.3",GLOB_CSTORY_ELEV)
text2 0,5*s,"GLOB_HSTORY_ELEV="+str("%.3",GLOB_HSTORY_ELEV)
text2 0,4*s,"GLOB_ELEVATION="+str("%.3",GLOB_ELEVATION)
text2 0,3*s,"WALL_POSITION[3]="+str("%.3",WALL_POSITION[3])
text2 0,2*s,"GLOB_HSTORY_ELEV="+str("%.3",GLOB_HSTORY_ELEV)
text2 0,1*s,"ac_glob_elevation="+str("%.3",ac_glob_elevation)
text2 0,0*s,"ac_wall_elevation="+str("%.3",ac_wall_elevation)

text2 0,-2*s,"Elevation to project zero:"+str("%.3",WALL_POSITION[3]+ac_glob_elevation) 
You see, that WALL_POSITION[3] does not work for markers in AC11, but for labels. In AC14 WALL_POSITION[3]+ac_glob_elevation brings the right value in both environments.

@zsolt
I will have alook tonight into the bug tracking system. It IS considered as a bug. I will have a look on the problem again, but it WAS a problem, when I tried to get a correct value of a label in a certain circumstance.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm