We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.

Request the top area of this slab?

yongler
Enthusiast
I want to make GDL for floor slab accessories and request the top area of this slab. I wrote this: n = REQUEST("SLAB_TOP_SURF" , " " , _area ) But it was not successful. May I ask how to write this sentence?
2 REPLIES 2
Pertti Paasky
Expert

I think the object does not get the area information of the slab, but You can calculate the area from the point information.

https://www.wikihow.com/Calculate-the-Area-of-a-Polygon  this site tells how.

- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.

@Pertti Paasky wrote:

I think the object does not get the area information of the slab


This is correct.

@yongler 

SLAB_TOP_SURF is not for use in REQUEST commands.

It is a Global Variable that can be used only in lists or labels - i.e. a label can give you the area of a slab.

As Pertti suggests, you will have to calculate the area from the point information (nodes) of the slab.

I am not quite sure why you would want the area for an accessory object though?

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11