Interpreting and analyzing scripts

The GDL Interpreter

When a GDL script is executed, the GDL interpreter engine will detect the location, size, rotation angle, user defined parameters
and the mirrored state of the library part.
It will then move the local coordinate system to the right position, ready to receive the GDL commands from the script of the library parts.
Every time a command for a basic shape is read by the interpreter, it will generate the geometric primitives that make up that particular shape.

When the interpreter has finished, the complete binary 3D model will be stored in the memory, and you can perform 3D projections,
fly-through renderings or sun studies on it.

contains a pre-compiler and an interpreter for GDL. Interpretation of a GDL script uses the pre-compiled code.
This feature increases speed of the analysis. If the GDL script is modified, a new code is generated.

Data structures converted from other file formats (e.g., DXF, Zoom, Alias Wavefront) are stored in a binary 3D section of the library parts.
This section is referenced by the BINARY command from the GDL script.


The GDL Script Analysis


Users have no control over the order in which library parts placed on the floor plan are analyzed.
The order of GDL script analysis is based on the internal data structure; moreover,
Undo and Redo operations as well as modifications may influence that order.
The only exceptions to this rule are special GDL scripts of the active library, whose names begin with
MASTER_GDL” or “MASTEREND_GDL“.


Scripts whose name begins with “MASTER_GDL” are executed before starting a list process and after loading the active library.


Scripts whose name begins with “MASTEREND_GDL” are executed when the active library is to be changed (Load Libraries, Open a project, New project, Quit).


These scripts are not executed when you edit library parts.
If your library contains one or more such scripts they will all be executed in an order that is not defined.


MASTER_GDL and MASTEREND_GDL scripts can include attribute definitions, initializations of GDL user global variables,
3D commands (effective only in the 3D model), value list definitions (see the VALUES command) and GDL extension-specific commands.
The attributes defined in these scripts will be merged into the current attribute set
(attributes with same names are not replaced, while attributes originated from GDL and not edited in the program are always replaced).