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.

Slab-like GDL or Param-O object for city planning?

Kaj_AL
Booster
Hi!

I'm working on a template for city planning and am currently looking for ways to easily mimic buildings in an early stage. Right now I'm using composite slabs with every story a different material, the materials being whatever functions the building has (residence, office, etc.). This doesn't feel optimal as the number of composites quickly become an unmanageable amount, and they're not quite as "smart" as I would like them to be.

So, my question is, is there anyway to build an object that behaves in a similar manner to a slab when it comes to modeling (new nodes with a click, easy to manipulate), or does any one have any other great ideas on how to do this?

Kind regards
Kaj
Archicad 24-27 SWE
Dell Precision 5560, Windows 11 Pro
11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz 2.61 GHz
21 REPLIES 21

Hi Peter!

 

So, I managed to almost figure it out, but there are still some issues. I used the ASSOCLP_PARVALUE to request ac_coords, which in my object are the coordinates of the slab. However, when imported to the label, I only get the coordinates of holes in the slab - see attached screenshot 1. This the code I use:

 

DIM ac_coords[]
n = REQUEST ("ASSOCLP_PARVALUE", "ac_coords", _unused, type, flags, dim1, dim2, ac_coords)

FOR i=1 TO vardim1(ac_coords)
TEXT2 x,y, ac_coords[i]
y=y-radhojd !Moving text to next row
NEXT i

   

The coordinates imported also look a bit weird. The 0.0508 (which is the status code meaning end of polygon) comes one coordinate to soon, and the last coordinates do not have a status code at all.

Any idea where the problem might be?

 

As for the UI... commands, I haven't figured out how to handle the array. My current interface looks like screenshot 2, and all those checkboxes and textboxes are attached to single parameters, which I then translate to arrays in my script. Since every story have five or six different parameters, it becomes a bit cluttered. Can I have the same appearance, but have the inputted text or checked box go straight to the array, and how would i script that?

 

Thank you!

/Kaj


Screenshot 1.pngScreenshot 2.png
Archicad 24-27 SWE
Dell Precision 5560, Windows 11 Pro
11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz 2.61 GHz

Hi,

with your code I got the contour and the hole of a "Floor Consruction" object correctly. Might there be something in your object that overwrites this parameter?

 

For the UI, this is an example from the "Wardrobe 02" object:

ui_infield{3}	bMirrorLeaf[iPanel], ...​
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Learn and get certified!