cancel
Showing results for 
Search instead for 
Did you mean: 

Easy GDL Script Editing to Place Multiple Instance as One Object

Vimal Kumar
Graphisoft
Graphisoft

This article will aim at creating multiple instances of selected object placing as one object, with a very simple script editing. It does not require you to have advance knowledge of any programming language. All you need is Archicad, up and running on your machine.

Let’s dive right into it and take an example of a MEP element. How about a basin cabinet?

 

Alright, so here we go!

Open the object from the File menu under Library and Object.

2.jpg

 

Select the object from library, in this case Basin Cabinet 23 and click on View.

3.jpg

 

This will take you to the object editor, where we will be editing the script.

The first thing we need to do is to Save as… our object and rename it. So, lets rename it as Basin Cabinet 23_GSSG.

16.png

 

Click on 2D tab and select the entire existing script and delete. Repeat for Master, 3D, Parameter and Interface tabs.

6.jpg

 

After deleting, type the following statement:

Call“Basin Cabinet 23” Parameters All

This will call the 2D Script of the object Basin Cabinet 23, make sure this object is part of the loaded library.

Repeat this step for 3D, Parameters and Interface tabs. Once done, click on the button Check Script on each tab to make sure the scripts are correct.8.jpg

 

You might encounter the following error, that does not affect the object placement and it is ok to ignore for now. When there is a fix it will be shared again in this blog.14.jpg

 

Switchback to 2D tab and add the following statement below the Call statement. ADD2 will move the cursor before placing the next content. Replace X with the width of the cabinet.

Add2 x,y

And add the Call statement again in the next line

Call “Basin Cabinet 23” Parameters All

This will add another instance of the basin cabinet in 2D.19.png

 

Repeat the above, specifying the required X values for every additional instance of the object.

Count the number of Add2 statements and add a Del statement in the last line as shown below. This is to reset the cursor.

Ex: Del 3 (3 X Add2 statements are there in the 2D Script)18.png

 

For 3D, add the following statements in the script to match the 2D script. X & Y should match the 2D Scripts X & Y.

Add x, y, z

Call “Basin Cabinet 23” Parameters All

This will add another instance of the basin cabinet in the 3D view.

Remember to add the Del statement as explained in 2D script.

Ex: Del 3 (If there is 3 Add statement then Del 3)17.png

 

Copy the 2D script for Parameter and Interface.

Finally, test it out by placing it in your project.13.jpg

 

Hope this post is useful, will see you all again with another blog post.

Till then, keep BIM-ing!

Still looking?

Browse more articles

Back to articles

See latest solutions

Accepted solutions

Start a new discussion!