- •Contents
- •General Overview
- •Starting Out
- •Scripting
- •Library Part Structure
- •Analyze, Deconstruct and Simplify
- •Elaboration
- •Entry Level
- •Intermediate Level
- •Advanced Level
- •Expert Level
- •3D Generation
- •The 3D Space
- •Coordinate Transformations
- •The GDL Interpreter
- •The GDL Script Analysis
- •GDL Syntax
- •Statements
- •Line
- •Label
- •Characters
- •Strings
- •Identifiers
- •Variables
- •Parameters
- •Simple Types
- •Derived Types
- •Coordinate Transformations
- •2D Transformations
- •3D Transformations
- •Managing the Transformation Stack
- •3D Shapes
- •Basic Shapes
- •BLOCK
- •BRICK
- •CYLIND
- •SPHERE
- •ELLIPS
- •CONE
- •PRISM
- •PRISM_
- •CPRISM_
- •BPRISM_
- •FPRISM_
- •HPRISM_
- •SPRISM_
- •SLAB
- •SLAB_
- •CSLAB_
- •CWALL_
- •BWALL_
- •XWALL_
- •XWALL_{2}
- •BEAM
- •CROOF_
- •MESH
- •ARMC
- •ARME
- •ELBOW
- •Planar Shapes in 3D
- •HOTSPOT
- •RECT
- •POLY
- •POLY_
- •PLANE
- •PLANE_
- •CIRCLE
- •Shapes Generated from Polylines
- •EXTRUDE
- •PYRAMID
- •REVOLVE
- •RULED
- •RULED{2}
- •SWEEP
- •TUBE
- •TUBEA
- •COONS
- •MASS
- •Elements for Visualization
- •LIGHT
- •PICTURE
- •3D Text Elements
- •TEXT
- •RICHTEXT
- •Primitive Elements
- •VERT
- •TEVE
- •VECT
- •EDGE
- •PGON
- •PIPG
- •COOR
- •BODY
- •BASE
- •Cutting in 3D
- •CUTPLANE
- •CUTPOLY
- •CUTPOLYA
- •CUTSHAPE
- •CUTFORM
- •Solid Geometry Commands
- •GROUP
- •ENDGROUP
- •ADDGROUP
- •SUBGROUP
- •ISECTGROUP
- •ISECTLINES
- •PLACEGROUP
- •KILLGROUP
- •SWEEPGROUP
- •Binary 3D
- •2D Shapes
- •Drawing Elements
- •HOTSPOT2
- •LINE2
- •RECT2
- •POLY2
- •POLY2_
- •POLY2_A
- •POLY2_B
- •POLY2_B{2}
- •POLY2_B{3}
- •CIRCLE2
- •SPLINE2
- •SPLINE2A
- •PICTURE2
- •PICTURE2{2}
- •Text Element
- •TEXT2
- •RICHTEXT2
- •Binary 2D
- •FRAGMENT2
- •FRAGMENT2
- •3D Projections in 2D
- •PROJECT2
- •PROJECT2{2}
- •PROJECT2{3}
- •Drawings in the List
- •DRAWING2
- •DRAWING3
- •DRAWING3{2}
- •DRAWING3{3}
- •Graphical Editing
- •Hotspot-based Editing Commands
- •HOTSPOT
- •HOTLINE2
- •HOTARC2
- •Status Codes
- •Status Code Syntax
- •Additional Status Codes
- •Previous part of the polyline: current position and tangent is defined
- •Segment by absolute endpoint
- •Segment by relative endpoint
- •Segment by length and direction
- •Tangential segment by length
- •Set start point
- •Close polyline
- •Set tangent
- •Set centerpoint
- •Tangential arc to endpoint
- •Tangential arc by radius and angle
- •Arc using centerpoint and point on the final radius
- •Arc using centerpoint and angle
- •Full circle using centerpoint and radius
- •Attributes
- •Directives
- •Directives for 3D and 2D Scripts
- •RADIUS
- •RESOL
- •TOLER
- •LINE_PROPERTY
- •[SET] STYLE
- •SET STYLE 0
- •Directives Used in 3D Scripts Only
- •MODEL
- •[SET] MATERIAL
- •SECT_FILL
- •SHADOW
- •Directives Used in 2D Scripts Only
- •DRAWINDEX
- •[SET] FILL
- •[SET] LINE_TYPE
- •Inline Attribute Definition
- •Materials
- •DEFINE MATERIAL
- •DEFINE MATERIAL BASED_ON
- •DEFINE TEXTURE
- •Fills
- •DEFINE FILL
- •DEFINE FILLA
- •DEFINE SYMBOL_FILL
- •DEFINE SOLID_FILL
- •DEFINE EMPTY_FILL
- •Line Types
- •DEFINE LINE_TYPE
- •DEFINE SYMBOL_LINE
- •Styles
- •DEFINE STYLE
- •DEFINE STYLE {2}
- •Paragraph
- •Textblock
- •Additional Data
- •External file dependence
- •Non-Geometric Scripts
- •The Properties Script
- •DATABASE_SET
- •DESCRIPTOR
- •REF DESCRIPTOR
- •COMPONENT
- •REF COMPONENT
- •BINARYPROP
- •SURFACE3D ( )
- •VOLUME3D ( )
- •POSITION
- •DRAWING
- •The Parameter Script
- •VALUES
- •PARAMETERS
- •LOCK
- •HIDEPARAMETER
- •The User Interface Script
- •UI_DIALOG
- •UI_PAGE
- •UI_CURRENT_PAGE
- •UI_BUTTON
- •UI_SEPARATOR
- •UI_GROUPBOX
- •UI_PICT
- •UI_STYLE
- •UI_OUTFIELD
- •UI_INFIELD
- •UI_INFIELD {2}
- •UI_INFIELD{3}
- •UI_TOOLTIP
- •Expressions and Functions
- •Expressions
- •VARDIM1(expr)
- •VARDIM2(expr)
- •Operators
- •Arithmetical Operators
- •Relational Operators
- •Boolean Operators
- •Functions
- •Arithmetical Functions
- •CEIL
- •ROUND_INT
- •Circular Functions
- •Transcendental Functions
- •Boolean Functions
- •Statistical Functions
- •Bit functions
- •BITTEST
- •BITSET
- •Special Functions
- •String Functions
- •SPLIT
- •STRLEN
- •STRSTR
- •STRSUB
- •Control Statements
- •Flow Control Statements
- •NEXT
- •GOTO
- •GOSUB
- •RETURN
- •END / EXIT
- •Parameter Buffer Manipulation
- •Macro Objects
- •The Output Statement
- •File Operations
- •OPEN
- •INPUT
- •VARTYPE
- •OUTPUT
- •CLOSE
- •Miscellaneous
- •Global Variables
- •General environment information
- •Story information
- •Fly-through information
- •General element parameters
- •Object, Lamp, Door, Window parameters
- •Object, Lamp parameters
- •Object, Lamp, Door, Window parameters - available for listing and labels only
- •Object, Lamp parameters - available for listing and labels only
- •Window, Door and Wall End parameters
- •Window, Door parameters - available for listing and labels only
- •Lamp parameters - available for listing and labels only
- •Label parameters
- •Wall parameters - available for Doors/Windows
- •Wall parameters - available for listing and labels only
- •Column parameters - available for listing and labels only
- •Beam parameters - available for listing and labels only
- •Slab parameters - available for listing and labels only
- •Roof parameters - available for listing and labels only
- •Fill parameters - available for listing and labels only
- •Mesh parameters - available for listing and labels only
- •Free users’ globals
- •Requests
- •REQUEST
- •Doors and Windows
- •General Guidelines
- •Creation of Door/Window Library Parts
- •3D related challanges
- •Rectangular Doors/Windows in Straight Walls
- •Non-Rectangular Doors/Windows in Straight Walls
- •WALLHOLE
- •WALLNICHE
- •Rectangular Doors/Windows in Curved Walls
- •Non-Rectangular Doors/Windows in Curved Walls
- •2D Related Challanges
- •Cutting custom wall opening
- •WALLHOLE2
- •WALLBLOCK2
- •WALLLINE2
- •WALLARC2
- •GDL Created from the Floor Plan
- •Keywords
- •Common Keywords
- •Reserved Keywords
- •3D Use Only
- •2D Use Only
- •Non-Geometric Scripts
- •Property Script
- •Parameter Script
- •Interface Script
- •Alphabetical List of Current GDL Keywords
- •Parameter Naming Convention
- •GDL Data I/O Add-On
- •Description of Database
- •Opening a Database
- •Reading Values from Database
- •Writing Values into Database
- •Closing Database
- •GDL DateTime Add-On
- •Opening Channel
- •Reading Information
- •Closing Channel
- •GDL File Manager I/O Add-On
- •Specifying Folder
- •Getting File/Folder Name
- •Finishing Folder Scanning
- •GDL Text I/O Add-On
- •Opening File
- •Reading Values
- •Writing Values
- •Closing File
- •Property GDL Add-On
- •OPEN
- •CLOSE
- •INPUT
- •OUTPUT
- •GDL XML Extension
- •Opening XML Document
- •Reading XML Document
- •Modifying XML Document
- •Index
- •Numerics
Attributes
y
x
angle: angle of the rotation.
Example:
DEFINE TEXTURE "Brick" "Brick.PICT", 1.35, 0.3, 256+128, 35.0
Fills
DEFINE FILL
DEFINE FILL name [[,] FILLTYPES_MASK fill_types,] pattern1, pattern2, pattern3, pattern4, pattern5, pattern6, pattern7, pattern8,
spacing, angle, n,
frequency1, direction1, offset_x1, offset_y1, m1, length11, ... length1m,
...
frequencyn, directionn, offset_xn, lengthn1, ... lengthnm
Note: This command can contain additional data definition.
See “Additional Data” on page 177 for details.
Any GDL script may include fill definitions prior to the first reference to that fill name. The fill defined this way can be used only in the script in which it was defined and its subsequent second generation-scripts.
166 |
ArchiCAD 11 GDL Reference Guide |
Attributes
length.... im lengthi2
lengthi1
Y
offset_yi
offset_xi X
m line parts
directioni |
|
frequency |
|
i |
frequency |
|
|
|
i |
name: name of the fill fill_types = j1 + 2 * j2 + 4 * j3 j1: cut fills
j2: cover fills j3: drafting fills
If the j bit is set, the defined fill can be used in ArchiCAD corresponding to its specified type. Default is all fills (0).
pattern definition: pattern1, pattern2, pattern3, pattern4, pattern5, pattern6, pattern7, pattern8: 8 numbers between 0 and 255 representing binary values. Defines the bitmap pattern of the fill.
yspacing*y
angle
spacing*x x
spacing: hatch spacing - defines a global scaling factor for the whole fill. All values will be multiplied by this number in both the x and y direction.
angle: global rotation angle in degrees
ArchiCAD 11 GDL Reference Guide |
167 |
Attributes
n: number of hatch lines
frequencyi: frequency of the line (the distance between two lines is spacing * frequencyi)
diri: direction angle of the line in degrees
offset_xi, offset_yi: offset of the line from the origin mi: number of line parts
lengthij: length of the line parts (the real length is spacing * lengthij). Line parts are segments and spaces following each other. First line part is a segment, zero length means a dot.
The bitmap pattern is only defined by the pattern1... pattern8 parameters and is used when the display options for Polygon Fills are set to “Bitmap Pattern” (Options menu). To define it, choose the smallest unit of the fill, and represent it as dots and empty spaces using a rectangular grid with 8x8 locations. The 8 pattern parameters are decimal representations of the binary values in the lines of the grid (a dot is 1, an empty space is 0).
The vectorial hatch is defined by the second part of the fill definition as a collection of dashed lines repeated with a given frequency (frequencyi). Each line of the collection is described by its direction (directioni), its offset from the origin (offset_xi, offset_yi) and the dashed line definition which contains segments and spaces with the given length (lengthij) following each other.
Note: Only simple fills can be defined with the DEFINE FILL command. There is no possibility to define symbol fills.
Example: |
"brick" 85, 255, 136, 255, |
|||||||
DEFINE FILL |
||||||||
34, |
255, |
136, |
255, |
|
|
|||
0.08333, |
0.0, |
4, |
|
0, |
||||
1.0, |
0.0, |
|
0.0, |
|
0.0, |
|||
3.0, |
90.0, |
0.0, |
|
0.0, |
|
2, |
||
1.0, |
1.0, |
|
1.5, |
|
1.0, |
|
4, |
|
3.0, |
90.0, |
|
|
|||||
1.0, |
3.0, |
|
1.0, |
|
1.0, |
|
2, |
|
1.5, |
90.0, |
0.75, |
3.0, |
|||||
1.0, |
5.0 |
|
|
|
|
|
|
|
Bitmap pattern: |
|
|
|
Pattern: Binary value: |
• • • • |
||
pattern1 = 85 |
01010101 |
||
pattern2 = 255 |
11111111 |
•••••••• |
|
pattern3 = 136 |
10001000 |
• |
• |
pattern4 = 255 |
11111111 |
•••••••• |
|
pattern5 = 34 |
00100010 |
• |
• |
pattern6 = 255 |
11111111 |
•••••••• |
|
pattern7 = 136 |
10001000 |
• |
• |
pattern8 = 255 |
11111111 |
•••••••• |
168 |
ArchiCAD 11 GDL Reference Guide |
Attributes
View: |
Vectorial hatch: |
||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEFINE FILLA
DEFINE FILLA name [,] [FILLTYPES_MASK fill_types,] pattern1, pattern2, pattern3, pattern4, pattern5, pattern6, pattern7, pattern8, spacing_x, spacing_y, angle, n, frequency1, directional_offset1, direction1,
offset_x1, offset_y1, m1, length11,
...
length1m, ... frequencyn, directional_offsetn, directionn, offset_xn, offset_yn, mn, lengthn1, ... lengthnm
Note: This command can contain additional data definition.
See “Additional Data” on page 177 for details.
An extended DEFINE FILL statement.
ArchiCAD 11 GDL Reference Guide |
169 |
Attributes
Additional parameters:
spacing_x, spacing_y: spacing factor in the x and y direction, respectively. These two parameters define a global scaling factor for the whole fill. All values in the x direction will be multiplied by spacing_x and all values in the y direction will be multiplied by spacing_y.
directional_offseti: the offset of the beginning of the next similar hatch line, measured along the line’s direction. Each line of the series will be drawn at a distance defined by frequencyi with an offset defined by directional_offseti. The real length of the offset will be spacing * directional_offseti.
Example: |
|
|
|
|
|
128, 232, |
|
DEFINE FILLA "TEST" 8, 142, |
|||||||
|
8, |
142, |
128, |
232, |
|
||
|
0.5, |
0.5, 0, |
2, |
|
|||
|
2, |
1, |
90, |
0, |
|
|
|
|
0, |
2, |
1, |
1, |
|
|
|
|
1, |
2, |
0, |
0, 0, |
|
||
FILL "TEST" |
2, |
1, |
3 |
|
|
|
|
POLY2 4, 6, |
|
|
|
|
|
|
|
-0.5, -0.5, 12, -0.5, |
|
||||||
12, 6, -0.5, 6 |
|
|
|
|
|||
Bitmap pattern: |
Binary value: |
|
|||||
Pattern: |
. |
||||||
pat1 = 8 |
00001000 |
|
• |
||||
pat2 = 142 |
10001110 |
|
••• |
||||
pat3 = 128 |
10000000 |
|
• |
|
|||
pat4 = 232 |
11101000 |
|
••• • |
||||
pat5 = 8 |
00001000 |
|
• |
• |
|||
pat6 = 142 |
10001110 |
|
••• |
||||
pat7 = 128 |
10000000 |
|
• |
|
|||
pat8 = 232 |
11101000••• |
• |
|
spacingy*y |
angle |
|
spacingx*x x |
170 |
ArchiCAD 11 GDL Reference Guide |