GDL Basics 4 – A Simple 2D Symbol

24 September 2013 Andrew Watson 1 Comment
ArchiCAD, Tip of the Day

You can use GDL objects to store symbols for commonly used 2D symbols and details. This requires next to no scripting (one line) and is really useful if you have a detail that might change slightly from project to project. You can simply add the object into the project’s embedded library, then edit it as required.

As an illustration, I’ll draw a North Pointer symbol.

All you need to do is:

  1. Draw the 2D symbol in plan view (or any other ArchiCAD view). Use fills, lines, splines, text, etc. – any 2D documentation element will do. Be sure to add hotspots (use the Hotspot tool from the ArchiCAD Toolbox) in strategic locations. The first hotspot you place will be the default placement point for the 2D symbol. NOTE: The drawing elements should be placed on the ArchiCAD layer.
    GDLB4_01
  2. Select the drawing elements, and copy (Control – C) them to the clipboard.
  3. Create a new object as outlined here
    GDLB4_02
  4. Click on the 2D Symbol button, and paste (Control -V) the drawing elements into the 2D symbol window.
    GDLB4_04
  5. Click on the 2D Script button, and type the following line of GDL code
    fragment2 1, 0
    GDLB4_05
  6. Save the object into the project’s Embedded library.

Voila! The new North Pointer object is ready to place.

Note that the object is of fixed size, and you can’t change the pens, line types, fills etc. This means that whenever it is placed, it will use the settings you used when you drew it. Which is generally a big time saver.

However you can edit the object whenever you like. The changes you made will apply to all placed instances of the object throughout your project. To edit the object:

  1. Open the library part for editing as outlined here
  2. Click on the 2D Symbol button.
  3. Edit the drawing elements.
  4. Save the object.

NOTE: One major limitation of this approach, is that no arrowheads can be included on lines or arcs. If you want to include an arrowhead, you have to draw it using a fill polygon.

Tags: ,