Creating a Custom GDL Object
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-03-19 11:17 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-03-19 01:06 PM
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
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-03-19 01:28 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-03-19 02:37 PM
AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-03-19 03:35 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-03-20 03:14 AM
AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-03-22 02:52 AM
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.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-03-22 11:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-03-22 12:22 PM
kmccrthy wrote: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.
I've attached a PDF of what I'm after
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-03-22 12:36 PM