Archicad from Version 27

Since Archicad 27 and the introduction of the new GDL editor, autoscripts are generated in the following way:

  1. Keep the GDL object open in the desired script (2D or 3D)
  2. Place a graphic 2D element or a body created with one of the 3D tools, whose most important insertion point should be on the project origin, in the floor plan and then select it.
  3. With the element selected in the floor plan, switch to the script window of the open GDL object and click the 5th icon button in the upper toolbar of the object editor
  4. The corresponding script is generated.

Current Output in ArchiCAD 27

Walls
Single-layer walls generate sprism_{4} commands together with base, vert and coor, as well as various GROUP commands.

Slabs
Single-layer slabs generate cprism_{4} commands together with base, vert and coor, as well as various GROUP commands. Arcs are split into individual polygon edges.

Roofs
Single-layer roofs generate croof_{4} commands together with various GROUP commands.

Beams
Non-profiled beams generate sprism_{4} commands together with xform, base, vert and coor, as well as various GROUP commands.

Free Form Surfaces
Free form surfaces generate mass{2} commands together with base, vert and coor, as well as various GROUP commands. Arcs are split into individual polygon edges.

Columns
Non-profiled columns generate sprism_{4} commands together with various GROUP commands.

Morphs
Morphs generate vert{2}, edge, vect and pgon commands together with various GROUP commands and xform.

Shells
Shells generate extrudedshell{3} commands together with xform and various GROUP commands.

Lines
Lines generate line2 commands.

Polylines
Polylines generate poly2_b{5} commands.

Hatches
Hatches generate poly2_b{5} commands.

2D Text
Shells generate paragraph, textblock and richtext2 commands.

Archicad before Version 27

We can generate GDL scripts from most elements created with Archicad tools using drag and drop techniques.
To do this, proceed as follows:

  • Place the element in the floor plan, preferably with a point on the global origin.
  • Open the GDL object, in the object open either the 3D or 2D script window, depending on the element type (2D or 3D element). If script is already present, please insert at least 2 line breaks.
  • Drag the element into the script window and the autoscript is generated there.

Current Output in ArchiCAD 22

as Archicad 27

Conversion Routine

The autoscripts now generated have changed repeatedly over the course of ArchiCAD versions.
Since I work most frequently with Poly2_B in 2D and PRISM_ in 3D, I have written a conversion routine that converts the poly2_b{5} command from 2D, which I generated with a hatch, into a POLY2_B command for 2D and a PRISM_ command for 3D. In this process, numerical values that are rounding deviations from zero are set to zero and all decimal places beyond 4 are deleted, as well as the mask values are rewritten from 2D relevance to 3D relevance.

Convert autoscripted POLY2_B{5} command