3. Introduction
GDL Reference Guide iii
Introduction
This manual is a complete reference to the GRAPHISOFT's proprietary scripting language, GDL (Geometric Description Language). The manual is recommended
for those users who wish to expand on the possibilities presented by the construction tools and object libraries in GRAPHISOFT software. It gives a detailed description
of GDL, including syntax definitions, commands, variables, etc.
4. GDL Reference Guide
GDL Reference Guide iv
Table of Contents
General Overview ........................................................................................................................................................... 1
Starting Out .......................................................................................................................................................... 1
Scripting ............................................................................................................................................................... 1
3D Generation ....................................................................................................................................................... 8
GDL Syntax ................................................................................................................................................................ 11
Rules of GDL Syntax ............................................................................................................................................ 11
Statements ........................................................................................................................................................... 11
Line ................................................................................................................................................................... 11
Label .................................................................................................................................................................. 11
Characters ........................................................................................................................................................... 11
Strings ................................................................................................................................................................ 12
Identifiers ............................................................................................................................................................ 12
Variables ............................................................................................................................................................. 12
Parameters ........................................................................................................................................................... 13
Simple Types ........................................................................................................................................................ 13
Derived Types ...................................................................................................................................................... 13
Structured Types ................................................................................................................................................... 14
Conventions used in this book ................................................................................................................................ 14
Coordinate Transformations ............................................................................................................................................ 16
2D Transformations .............................................................................................................................................. 16
ADD2 ........................................................................................................................................................ 16
MUL2 ......................................................................................................................................................... 16
ROT2 ......................................................................................................................................................... 17
3D Transformations .............................................................................................................................................. 17
ADDX ....................................................................................................................................................... 17
ADDY ........................................................................................................................................................ 17
ADDZ ........................................................................................................................................................ 17
ADD .......................................................................................................................................................... 17
MULX ........................................................................................................................................................ 18
MULY ........................................................................................................................................................ 18
10. GDL Reference Guide
GDL Reference Guide x
POLY2_A .................................................................................................................................................. 184
POLY2_B .................................................................................................................................................. 185
POLY2_B{2} ............................................................................................................................................. 185
POLY2_B{3} ............................................................................................................................................. 186
POLY2_B{4} ............................................................................................................................................. 186
POLY2_B{5} ............................................................................................................................................. 186
POLY2_B{6} ............................................................................................................................................. 187
ARC2 ........................................................................................................................................................ 188
CIRCLE2 .................................................................................................................................................. 188
SPLINE2 ................................................................................................................................................... 189
SPLINE2A ................................................................................................................................................ 190
PICTURE2 ................................................................................................................................................ 192
PICTURE2{2} ........................................................................................................................................... 192
Text Element ...................................................................................................................................................... 192
TEXT2 ..................................................................................................................................................... 192
RICHTEXT2 ............................................................................................................................................. 193
Binary 2D .......................................................................................................................................................... 193
FRAGMENT2 ............................................................................................................................................ 193
3D Projections in 2D ........................................................................................................................................... 193
PROJECT2 ................................................................................................................................................ 193
PROJECT2{2} ........................................................................................................................................... 194
PROJECT2{3} ........................................................................................................................................... 197
PROJECT2{4} ........................................................................................................................................... 198
Drawings in the List ............................................................................................................................................ 201
DRAWING2 .............................................................................................................................................. 201
DRAWING3 .............................................................................................................................................. 201
DRAWING3{2} ......................................................................................................................................... 201
DRAWING3{3} ......................................................................................................................................... 201
Graphical Editing Using Hotspots .................................................................................................................................. 203
Status Codes ............................................................................................................................................................... 211
Status Code Syntax .............................................................................................................................................. 211
Additional Status Codes ........................................................................................................................................ 212
Previous part of the polyline: current position and tangent is defined ..................................................................... 213
11. GDL Reference Guide
GDL Reference Guide xi
Segment by absolute endpoint ........................................................................................................................ 213
Segment by relative endpoint ......................................................................................................................... 213
Segment by length and direction ..................................................................................................................... 214
Tangential segment by length ......................................................................................................................... 214
Set start point ............................................................................................................................................. 215
Close polyline ............................................................................................................................................. 215
Set tangent ................................................................................................................................................. 215
Set centerpoint ............................................................................................................................................ 216
Tangential arc to endpoint ............................................................................................................................. 216
Tangential arc by radius and angle .................................................................................................................. 217
Arc using centerpoint and point on the final radius ............................................................................................ 217
Arc using centerpoint and angle ..................................................................................................................... 218
Full circle using centerpoint and radius ............................................................................................................ 218
Attributes ................................................................................................................................................................... 224
Directives ........................................................................................................................................................... 224
Directives for 3D and 2D Scripts ................................................................................................................... 224
LET ................................................................................................................................................. 224
RADIUS ............................................................................................................................................ 224
RESOL ............................................................................................................................................. 225
TOLER ............................................................................................................................................. 226
PEN ................................................................................................................................................. 227
LINE_PROPERTY ............................................................................................................................. 228
[SET] STYLE ..................................................................................................................................... 228
Directives Used in 3D Scripts Only ................................................................................................................. 228
MODEL ............................................................................................................................................ 228
[SET] MATERIAL .............................................................................................................................. 229
[SET] BUILDING_MATERIAL ............................................................................................................ 230
SECT_FILL ....................................................................................................................................... 231
SECT_ATTRS .................................................................................................................................... 231
SECT_ATTRS{2} ............................................................................................................................... 231
SHADOW ......................................................................................................................................... 231
Directives Used in 2D Scripts Only ................................................................................................................. 233
DRAWINDEX ................................................................................................................................... 233
15. GDL Reference Guide
GDL Reference Guide xv
Relational Operators .................................................................................................................................... 305
Boolean Operators ....................................................................................................................................... 305
Functions ........................................................................................................................................................... 306
Arithmetical Functions ................................................................................................................................. 306
ABS .................................................................................................................................................. 306
CEIL ................................................................................................................................................ 306
INT .................................................................................................................................................. 306
FRA ................................................................................................................................................. 306
ROUND_INT .................................................................................................................................... 306
SGN ................................................................................................................................................. 306
SQR ................................................................................................................................................. 306
Circular Functions ....................................................................................................................................... 307
ACS .................................................................................................................................................. 307
ASN ................................................................................................................................................. 307
ATN ................................................................................................................................................. 307
COS ................................................................................................................................................. 307
SIN .................................................................................................................................................. 307
TAN ................................................................................................................................................. 307
PI .................................................................................................................................................... 307
Transcendental Functions .............................................................................................................................. 308
EXP ................................................................................................................................................. 308
LGT ................................................................................................................................................. 308
LOG ................................................................................................................................................ 308
Boolean Functions ....................................................................................................................................... 308
NOT ................................................................................................................................................ 308
Statistical Functions ..................................................................................................................................... 308
MIN ................................................................................................................................................. 308
MAX ................................................................................................................................................ 308
RND ................................................................................................................................................ 309
Bit Functions .............................................................................................................................................. 309
BITTEST .......................................................................................................................................... 309
BITSET ............................................................................................................................................ 309
Special Functions ........................................................................................................................................ 309
16. GDL Reference Guide
GDL Reference Guide xvi
REQ ................................................................................................................................................. 309
REQUEST ......................................................................................................................................... 310
IND ................................................................................................................................................. 310
APPLICATION_QUERY ..................................................................................................................... 311
LIBRARYGLOBAL ............................................................................................................................. 311
String Functions .......................................................................................................................................... 311
STR .................................................................................................................................................. 311
STR{2} ............................................................................................................................................. 312
SPLIT ............................................................................................................................................... 315
STW ................................................................................................................................................. 316
STRLEN ........................................................................................................................................... 316
STRSTR ............................................................................................................................................ 317
STRSUB ............................................................................................................................................ 317
STRTOUPPER ................................................................................................................................... 318
STRTOLOWER .................................................................................................................................. 318
Control Statements ...................................................................................................................................................... 319
Flow Control Statements ....................................................................................................................................... 319
FOR - TO - NEXT .................................................................................................................................... 319
DO - WHILE ............................................................................................................................................ 320
WHILE - ENDWHILE ............................................................................................................................... 320
REPEAT - UNTIL ...................................................................................................................................... 321
IF - GOTO ............................................................................................................................................... 322
IF - THEN - ELSE - ENDIF ....................................................................................................................... 323
GOTO ...................................................................................................................................................... 324
GOSUB .................................................................................................................................................... 324
RETURN .................................................................................................................................................. 324
END / EXIT ............................................................................................................................................. 325
BREAKPOINT .......................................................................................................................................... 325
Parameter Buffer Manipulation ............................................................................................................................... 325
PUT ......................................................................................................................................................... 326
GET ......................................................................................................................................................... 326
USE ......................................................................................................................................................... 326
NSP .......................................................................................................................................................... 326
17. GDL Reference Guide
GDL Reference Guide xvii
Macro Objects .................................................................................................................................................... 329
CALL ....................................................................................................................................................... 329
Output in an Alert Box or Report Window .............................................................................................................. 331
PRINT ...................................................................................................................................................... 331
File Operations ................................................................................................................................................... 331
OPEN ...................................................................................................................................................... 332
INPUT ...................................................................................................................................................... 332
VARTYPE ................................................................................................................................................. 332
OUTPUT .................................................................................................................................................. 332
CLOSE ..................................................................................................................................................... 333
Using Deterministic Add-Ons ................................................................................................................................ 333
INITADDONSCOPE .................................................................................................................................. 333
PREPAREFUNCTION ................................................................................................................................ 333
CALLFUNCTION ...................................................................................................................................... 333
CLOSEADDONSCOPE .............................................................................................................................. 334
Miscellaneous .............................................................................................................................................................. 335
Global Variables .................................................................................................................................................. 335
Script compatibility ...................................................................................................................................... 335
General environment information ................................................................................................................... 336
Story information ........................................................................................................................................ 341
Fly-through information ............................................................................................................................... 341
General element parameters ........................................................................................................................... 343
Object, Lamp, Door, Window, Wall End, Skylight parameters ............................................................................... 344
Object, Lamp, Door, Window, Wall End, Skylight, Curtain Wall Accessory parameters - available for listing and labels
only .......................................................................................................................................................... 345
Object, Lamp, Curtain Wall Accessory parameters - available for listing and labels only ............................................... 345
Opening parameters - available for listing and labels only ..................................................................................... 345
Opening symbol parameters .......................................................................................................................... 347
Window, Door and Wall End parameters .......................................................................................................... 350
Window, Door parameters - available for listing and labels only ............................................................................. 351
Lamp parameters - available for listing and labels only ........................................................................................ 352
Marker parameters (Detail, Worksheet and Change Markers) ................................................................................. 352
Label parameters ......................................................................................................................................... 353
18. GDL Reference Guide
GDL Reference Guide xviii
Wall parameters - available for Doors/Windows, listing and labels .......................................................................... 354
Wall parameters - available for listing and labels only .......................................................................................... 357
Column parameters - available for listing and labels only ...................................................................................... 359
Beam parameters - available for listing and labels only ......................................................................................... 365
Slab parameters - available for listing and labels only ........................................................................................... 370
Stair component parameters .......................................................................................................................... 373
General stair variables - available for listing and labels ................................................................................. 373
General tread variables - available for listing and labels ................................................................................ 375
General riser variables - available for listing and labels ................................................................................. 376
Stair structure variables - available for listing and labels ............................................................................... 377
Stair Model View Options variables ......................................................................................................... 377
Stair 2D variables - available for floor plan representation only ...................................................................... 378
Stair grid variables ....................................................................................................................... 379
Stair walking line symbol variables .................................................................................................. 382
Stair break mark symbol variables ................................................................................................... 384
Rise and Run description variables .................................................................................................. 385
Stair draining 2D variables ............................................................................................................ 385
Stair structure 2D variables - Beam Structures ................................................................................... 387
Stair structure 2D variables - Monolithic Structure ............................................................................. 388
General 2D related variables .......................................................................................................... 392
Stair 3D variables - available for 3D representation (and connecting viewpoints) only ......................................... 395
Stair riser 3D variables ................................................................................................................. 395
Stair tread 2D-3D variables ........................................................................................................... 396
Stair structure variables ................................................................................................................. 399
Railing component parameters ....................................................................................................................... 401
General railing variables - available for listing and labels .............................................................................. 401
Railing 3D variables ............................................................................................................................. 402
Railing 2D variables ............................................................................................................................. 408
Roof parameters - available for skylights, listing and labels ................................................................................... 412
Roof parameters - available for listing and labels only ......................................................................................... 415
Fill parameters - available for listing and labels only ............................................................................................ 416
Mesh parameters - available for listing and labels only ......................................................................................... 417
Curtain Wall component parameters ................................................................................................................ 418
19. GDL Reference Guide
GDL Reference Guide xix
Curtain Wall parameters - available for listing and labels only ................................................................................ 420
Curtain Wall Frame parameters ...................................................................................................................... 421
General Curtain Wall Frame variables - available for listing and labels only ....................................................... 421
Curtain Wall Frame 3D variables ............................................................................................................ 421
Curtain Wall Panel variables ........................................................................................................................... 423
Curtain Wall Panel parameters - available for listing and labels only ........................................................................ 424
Curtain Wall Junction parameters - available for listing and labels only .................................................................... 424
Curtain Wall Accessory parameters - available for listing and labels only .................................................................. 425
Migration parameters - available for migration scripts only ................................................................................... 425
Skylight parameters - available for listing and labels only ...................................................................................... 425
Common Parameters for Shells and Roofs - available for listing and labels only ......................................................... 425
Parameters for Morphs - available for listing and labels only ................................................................................. 430
Free users’ globals ....................................................................................................................................... 431
Example usage of global variables ................................................................................................................... 432
Deprecated Global Variables .......................................................................................................................... 432
Deprecated Beam/Column Global Variables - available for listing and labels only ...................................................... 433
Deprecated Label Global Variables .................................................................................................................. 433
Deprecated Curtain Wall Frame Global Variable - available for listing and labels only ................................................. 435
Old Global Variables .................................................................................................................................... 435
Fix named optional parameters .............................................................................................................................. 437
Parameters set by ARCHICAD ...................................................................................................................... 437
Parameters for D/W attributes (available for Door, Window, Label, Listing) ..................................................... 438
Floor plan display ........................................................................................................................ 438
Direction ................................................................................................................................... 438
Polygonal wall data ...................................................................................................................... 439
Hole position ............................................................................................................................. 439
Anchor data ............................................................................................................................... 439
Parameters for WALL attributes (available for Door, Window, Label, Listing) ................................................... 439
Floor plan display ........................................................................................................................ 439
Geometric data ........................................................................................................................... 440
Parameters for COLUMN attributes (available for Label, Listing) ................................................................... 440
Floor plan display ........................................................................................................................ 441
Geometric data ........................................................................................................................... 442
20. GDL Reference Guide
GDL Reference Guide xx
Parameters for BEAM attributes (available for Label, Listing) ........................................................................ 442
Floor plan display ........................................................................................................................ 442
Geometric data ........................................................................................................................... 443
Parameters for ROOF attributes (available for Label, Listing) ........................................................................ 444
Floor plan display ........................................................................................................................ 444
Door/Window Marker attributes ............................................................................................................ 444
Detail/Worksheet Marker attributes ......................................................................................................... 446
Drawing Title attributes ........................................................................................................................ 446
General running context ....................................................................................................................... 447
Room parameters (available for Zone Stamps) ........................................................................................... 448
Stair related parameters ......................................................................................................................... 450
Flight / Landing Side Supported subtypes ........................................................................................ 450
Riser Component subtype ............................................................................................................. 450
Stair 2D Component subtypes ....................................................................................................... 450
Parameters set/read by ARCHICAD ............................................................................................................... 450
Stair related parameters ......................................................................................................................... 450
Structure subtype ........................................................................................................................ 450
Parameters read by ARCHICAD .................................................................................................................... 451
Objects on Floor Plan .......................................................................................................................... 451
Floor plan cutting of planar elements (i.e. skylight object, roof accessory objects) ....................................... 451
Door/Window objects .......................................................................................................................... 452
Custom Component Template ................................................................................................................ 453
Stair related parameters ......................................................................................................................... 453
Structure subtype ........................................................................................................................ 453
Flight / Landing Under Supported subtype ....................................................................................... 453
Flight Under Supported Cantilever / Landing Cantilever Supported subtypes ............................................ 454
Railing related parameters ...................................................................................................................... 454
Railing Panel Component subtype ................................................................................................... 454
Railing Rail Component subtype ..................................................................................................... 454
Railing Post Component subtype .................................................................................................... 455
Railing End Component subtype .................................................................................................... 456
Parameters for Curtain Wall ........................................................................................................................... 456
Curtain Wall Parameters set and read by ARCHICAD ................................................................................. 457
21. GDL Reference Guide
GDL Reference Guide xxi
Curtain Wall Frame parameters ...................................................................................................... 457
Curtain Wall Parameters set by ARCHICAD ............................................................................................. 457
Curtain Wall Frame parameters ...................................................................................................... 457
Curtain Wall Panel parameters ........................................................................................................ 458
Curtain Wall Junction parameters .................................................................................................... 458
Curtain Wall Accessory parameters .................................................................................................. 458
Curtain Wall Frame Deprecated parameters ....................................................................................... 459
Curtain Wall Parameters read by ARCHICAD ........................................................................................... 460
Curtain Wall Panel and Frame parameters ......................................................................................... 460
Curtain Wall Frame parameters ...................................................................................................... 461
Curtain wall panel parameters ........................................................................................................ 462
Parameters for add-ons ................................................................................................................................. 463
Parameters of Skylight add-on ................................................................................................................ 463
Hole edge cut manipulation ........................................................................................................... 463
Parameters of Corner Window add-on ..................................................................................................... 463
Basic parameters of Corner Window objects ..................................................................................... 463
Wall skins data parameters of Corner Window objects (available from ARCHICAD 12) .............................. 464
Parameters of IFC add-on ..................................................................................................................... 464
Common basic parameters of Door and Window objects ..................................................................... 464
Basic parameters of Door objects ................................................................................................... 466
Basic parameters of Window objects ............................................................................................... 469
Basic parameters of Transport Elements ........................................................................................... 472
Basic parameters of Lift objects ...................................................................................................... 472
Basic parameters of Stair objects .................................................................................................... 473
Basic parameters of MEP elements ................................................................................................. 475
Parameters for Text Handling ........................................................................................................................ 476
Parameters for Labels ................................................................................................................................... 477
Parameters set or read by ARCHICAD .................................................................................................... 477
Parameters read by ARCHICAD ............................................................................................................ 479
Deprecated parameters ................................................................................................................................. 480
Deprecated Beam/Column parameters - available for listing and labels only ..................................................... 480
Deprecated Zone Stamp parameters ........................................................................................................ 481
REQUEST Options ............................................................................................................................................. 481
22. GDL Reference Guide
GDL Reference Guide xxii
Request Parameter Script Compatibility ............................................................................................................ 481
Details of Requests ..................................................................................................................................... 487
Profile Requests .......................................................................................................................................... 509
Deprecated Requests .................................................................................................................................... 512
Application Query Options ................................................................................................................................... 512
Document feature ........................................................................................................................................ 513
View direction .................................................................................................................................... 513
MEP System .............................................................................................................................................. 513
Get MEP Systems ............................................................................................................................... 513
Get Domain ....................................................................................................................................... 513
Get Contour Pen ................................................................................................................................ 514
Get Fill Pen ....................................................................................................................................... 514
Get Background Pen ............................................................................................................................ 514
Get Fill Type ...................................................................................................................................... 514
Get Center Line Type .......................................................................................................................... 515
Get Center Line Pen ............................................................................................................................ 515
Get System Material ............................................................................................................................. 515
Get Insulation Material ......................................................................................................................... 515
MEP Modeler ............................................................................................................................................. 516
Is Available ........................................................................................................................................ 516
MEP Connection Type ................................................................................................................................. 516
Get Connection Types .......................................................................................................................... 516
Get Connection Type Style .................................................................................................................... 516
MEP Flexible Segment ................................................................................................................................. 517
Start Sectioning ................................................................................................................................... 517
Add Control Point ............................................................................................................................... 517
Add Direction and Width Vector ............................................................................................................ 517
End Sectioning ................................................................................................................................... 518
MEP Bend ................................................................................................................................................. 518
Start Sectioning ................................................................................................................................... 518
Parameter Script .......................................................................................................................................... 519
First Occasion in Progress .................................................................................................................... 519
Built-in Properties ....................................................................................................................................... 519