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

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

Making parametric 2D objects with GDL

Reilly
Booster

I am currently working on creating a library of objects for my office. I have had success creating customizable 2D objects with certain parameters and options such as different views and elements that can be turned on and off (e.g. a sink with the option of showing/hiding the pedestal, or a bed with headboard and footboard that can be turned off). So far, though, I am limited to objects with fixed dimensions and want to create objects that can stretch and be more customizable. For example, I can create an object like a bed, which has a number of set standard sizes, and toggle between these sizes as options in the settings. However, I want to create an object like a couch which can be stretched to custom sizes without the arms being distorted.

 

Essentially, how can I make specific lines stretch without distorting other lines in a 2D object?

 

Operating system used: Mac Apple Silicon

3 REPLIES 3
cuba
Expert

There are some great tutorials about this on barking dog bim:

https://www.youtube.com/@BarkingDogBIM/videos

 

Apple M1 Max 32 GB Ventura
AC27

I have been going through his tutorials but I haven't found a quick answer to this specific question yet. I'm sure it will come up but I figured it couldn't hurt to ask here in case someone has experience with this.

Barry Kelly
Moderator

You need to learn how to script in GDL.

Use parameters for your various lengths, widths and heights.

Then instead of scripting a fixed size line (LINE2 0,0 3,0) you would use the parameters in the command.

i.e. this will give you an adjustable cabinet (box made of lines - you could also just use RECT2)

LINE2 0,0,cabinet_length,0

LINE2 cabinet_length,0,cabinet_length,cabinet_depth

LINE2 cabinet_length,cabinet_depth,0,cabinet_depth

LINE2 0,cabinet_depth,0,0

 

or

RECT2 0,0,cabinet_length,cabinet_depth

 

There is much more involved 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

Setup info provided by author