BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Library object inclusion with CALL command?

Anonymous
Not applicable
Dear GDLers,

I have created my first HelloGDL parametric table. However, instead of the BLOCKs I used as chairs (that are parametrically laid out around the table) I would like to use one of the many chairs from the built in library.

I could certainly copy the Script from the chair in mind from the library into my script and call a subroutine or s.th. but I am convinced there is a more ellegant way than this.

I guess the CALL command is a potential candidate, but I could not figure out how to use it properly .

I was not able to retrieve anything after browsing the docs.

Has somebody a small example for me?

Thanks a lot in advance
Jakob
1 REPLY 1
Anonymous
Not applicable
Hello,

Just make new (length) parameters in the main object;
leg_x_dim
leg_y_dim
leg_z_dim

and the main object's 3D-code;

!--calling lower left leg
add -a/2+ leg_x_dim/2, -b/2+leg_y_dim, 0
call 'legmacro' parameters a=leg_x_dim, b=leg_y_dim, zzyzx=leg_z_dim
del 1


!--calling lower right leg
add a/2- leg_x_dim/2, -b/2+leg_y_dim, 0
call 'legmacro' parameters a=leg_x_dim, b=leg_y_dim, zzyzx=leg_z_dim
del 1



In the 'legmacro.gsm' you have 3D-code;

add -a/2, -b/2, 0 !<--movement to centralize the leg
block a, b, zzyzx
del 1



!--the leg dimensions can be hard coded too -> so no need to make parameters 'leg_x_dim' , etc.

call 'legmacro' parameters a=0.03, b= 0.04, zzyzx=0.7


The point here is to have parameters of same name and type when transferring data; here A, B, ZZYZX.

You could also;

call 'legmacro' parameters

In this case the leg has the macro's default dimensions.



Hope this helps.
Learn and get certified!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!