BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

GDL
About building parametric objects with GDL.
SOLVED!

Request(?) opening direction

DNU
Contributor

Hi

 

I'm creating a label that shows the 'opening centerheight value' of an opening (created with the opening tool) in a wall (horizontal direction). This works fine. But openings can also be used in slabs (vertical direction) and I want to use the same label for these. If 'Opening centerheight values' is used in slabs the label goes corrupt and I actualy dont need this value in slabs. So if i can know the direction of a opening, i can exclude this part of the script.


Is there a way to find out in wich direction the opening is used?

 

For now i'm using a boolean in the label properties, I hope I can do it automaticly.

DNU_0-1704961994108.png

 

AC 14 - 27
WIN 10
GDL
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
runxel
Legend

Why did you double post? Anyway, gonna answer here.

 

So, first of all, no. Sadly there is no (known to me) way to determine in what element the labeled opening sits in. I hope this will be available at some point.

Until then however there is a bit of a stupid workaround: Use "haskey(OPENING_CENTERHEIGHT_VALUES.toProjectZero)". If resolving to NO it is an opening in slab.

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

6 REPLIES 6
Yves
Advocate

Hi
For labels you must use GLOB_ELEM_TYPE to define the different values

 

! ==============================================================================
! values for GLOB_ELEM_TYPE
! ==============================================================================
ELEM_TYPE_LABEL			= 0
ELEM_TYPE_OBJECT		= 1
ELEM_TYPE_LAMP			= 2
ELEM_TYPE_WINDOW		= 3
ELEM_TYPE_DOOR			= 4
ELEM_TYPE_WALL			= 5
ELEM_TYPE_COLUMNPARENT	= 6
ELEM_TYPE_SLAB			= 7
ELEM_TYPE_ROOF			= 8
ELEM_TYPE_FILL			= 9
ELEM_TYPE_MESH			= 10
ELEM_TYPE_ZONE			= 11
ELEM_TYPE_BEAMPARENT	= 12
ELEM_TYPE_CW			= 13
ELEM_TYPE_CWFRAME		= 14
ELEM_TYPE_CWPANEL		= 15
ELEM_TYPE_CWJUNCT		= 16
ELEM_TYPE_CWACC			= 17
ELEM_TYPE_SHELL			= 18
ELEM_TYPE_SKYLIGHT		= 19
ELEM_TYPE_MORPH			= 20
ELEM_TYPE_STAIR			= 21
ELEM_TYPE_ST_TREAD		= 22
ELEM_TYPE_ST_RISER		= 23
ELEM_TYPE_ST_STRUCT		= 24
ELEM_TYPE_RAILING		= 25
ELEM_TYPE_OPENING		= 26
ELEM_TYPE_COLUMNSEGMENT	= 27
ELEM_TYPE_BEAMSEGMENT	= 28



IF GLOB_ELEM_TYPE = ELEM_TYPE_WALL THEN
...
ELSE
...
ENDIF
Yves Houssier
Belgium
Archicad 19 -> 24
iMac - Mac Os 10,13
DNU
Contributor

Hi Yves

The label is always linked to the opening (created with the opening tool). 
So the result will always be GLOB_ELEM_TYPE = 26.
GLOB_ELEM_TYPE doens't give any information about the direction of the object or information of the elements linked to the opening.

AC 14 - 27
WIN 10
GDL
Yves
Advocate

Effectively …
Sorry

Yves Houssier
Belgium
Archicad 19 -> 24
iMac - Mac Os 10,13
Solution
runxel
Legend

Why did you double post? Anyway, gonna answer here.

 

So, first of all, no. Sadly there is no (known to me) way to determine in what element the labeled opening sits in. I hope this will be available at some point.

Until then however there is a bit of a stupid workaround: Use "haskey(OPENING_CENTERHEIGHT_VALUES.toProjectZero)". If resolving to NO it is an opening in slab.

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Hi Lucas

 

Thanks, this workaround works perfect for my problem.
The other post is about the geometry (shape) of the opening (rectangular, circular, polygonal).

 

AC 14 - 27
WIN 10
GDL

Ah my bad, I misread. Shouldn't post when too tired 😛

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
Learn and get certified!