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

Create GDL object using several GDL objects

Anonymous
Not applicable
I'm new in GDL programming. I made different GDL objects and I need to put them together as one object. But some of them are multiplied and with different size. When I was making them as one GDL file these objects were inserted with CALL script.

Script.JPG
1 REPLY 1
Frank Beister
Moderator
You can merge the objects by merging the script code (copy&paste) in one object or by CALLing each sub-object out of a new main object.

I would prefer the second method, because you don't have to care about the environment of the other objects like double used variable names or done transformings of the coordinate system.

You can do all ADD/ROT/MULs necessary in GDL to bring the origin for your existing object in the right position in space. Then make the CALL with all the settings (e.g. a=2, visible=2 etc.) after "PARAMETERS" you would do, if you place the (macro)object in the floor plan.

As you have obvisiously done you can use the "save as object" option the automatically produce the main object. In this case you have to edit the resulting code to return it to be parametric (if necessary).

You can do the CALLs as often as you like. You can insert it into loops too:
for x =0 to 20 step 5

  addx x

  CALL "Raamja_dalja" PARAMETERS ......<- your settings

  del 1 

  next x
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