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

Creating a Custom GDL Object

Anonymous
Not applicable
Im not sure I made myself clear before.

I have created a 3D model of a 13amp double socket and saved it as an object. I have then opened the object up and created a 2D symbol for it. Which all works great. The only problem I have is when we have two sockets in the same place, one above the other. In elevation its fine but on plan there are two symbols overlaying each other (which would cause problems for the electrician). Is there a way that I can change the 2D script to give me the option of offsetting the 2D symbol from the 3d model? That way the 3D model stays in the correct place and the plan shows two symbols in different positions.

Many thanks
13 REPLIES 13
David Maudlin
Rockstar
kmccrthy:

You would need to add some additional code to the 2D Script to move the 2D Symbol, this will not change the location of the model in the 3D Script. The command to move the local origin in the 2D Script is Add2, you can find basic information in the GDL Reference Guide pdf file included with ArchiCAD. If you drew the symbol in the 2D Symbol window, then you will need to use the Fragment2 command to call it into the 2D Script. You will also need to add some sort of IF/THEN statements along with an additional parameter so the user has the option of moving the symbol, possibly with editable hotspots.

You should add a Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Anonymous
Not applicable
I drew the symbol in the 2D Symbol Window. But I'm a complete novice with script. I wouldn't know where to begin. Where would I add the Fragment2 script? I've attached a screen shot of what I have there already. Where do I start?
Screen shot 2010-03-19 at 12.31.08.png
Erich
Booster
You could try the Electrigon part, available here www.archicad.ca/. This part has the ability to separate the 2D versus 3D positioning. It certainly helps with stacked outlets as well as with 2D clarity. I am not sure if it can be configured to meet your 2D display needs or not but it s fairly flexible so it can likely work.
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
Anonymous
Not applicable
Thanks, I downloaded it but it doesn't seem to do exactly what I want
Erich
Booster
Do you have a picture of what you want?
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
Anonymous
Not applicable
Hi kmccrthy,

In GDL it is very hard to make two objects (or two instances of an object) talks to each other.
There are two ways you do your two (13amp double socket) will not overlap each other.
1. Use the API (apx) to check all 13amp double sockets position + offset and if two elements having same value move one of them.
2. If you don’t want to use API then you have to use the hard way. Write the text file of three global variables (SYMB_POS_X, SYMB_POS_Y, SYMB_POS_Z) by using OPEN, OUTPUT, CLOSE commands. If the other object try to insert at same location then offset the insertion position and save the new position by using OPEN, INPUT, OUTPUT and CLOSE commands. ( this is the complicated process and is slow.)
Anonymous
Not applicable
I've attached a PDF of what I'm after
Ralph Wessel
Mentor
kmccrthy wrote:
I've attached a PDF of what I'm after
How would it be if you allow your object to optionally represent more than one socket? You could have a parameter for the number of sockets, and a parameter array for the heights they are placed at. Your 3D script would simply redraw the same object at each required height, and the 2D script could offset each image it draws so they are clearly visible.
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
I think it would be great to know how its done, however I would then come across another problem. There will be a situation when we have two different types of sockets one above another.