Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
05 ArchiCAD 11 GDL Reference Guide.pdf
Скачиваний:
60
Добавлен:
11.03.2015
Размер:
3.22 Mб
Скачать

ATTRIBUTES

In the first part of this chapter, directives influencing the interpretation of GDL statements are presented. Directives may define the smoothness used for cylindrical elements, representation mode in the 3D view or the assignment of an attribute (color, material, text style, etc.) for the subsequent shapes. Inline attribute definition is covered in the second part. This feature allows you to assign to your objects customized materials, textures, fill patterns, line types and text styles that are not present in the current attribute set of your project.

DIRECTIVES

The influence of directives on the interpretation of the subsequent GDL statements remains in effect until the next directive or the end of the script. Called scripts inherit the current settings: the changes have local influence. Returning from the script resets the settings as they were before the macro call.

Directives for 3D and 2D Scripts

[LET]

[LET] varnam = n

Value assignment. The LET directive is optional. The variable will store the evaluated value of n.

ArchiCAD 11 GDL Reference Guide

151

Attributes

RADIUS

RADIUS radius_min, radius_max

Sets smoothness for cylindrical elements and arcs in polylines.

A circle with a radius of r is represented:

if r < radius_min, by a hexagon,

if r > radius_max, by a 36-edged polygon,

if radius_min < r < radius_max, by a polygon of (6+30*(r–radius_min)/(radius_max–radius_min)) edges. Arc conversion is proportional to this.

After a RADIUS statement, ανψprevious RESOL and TOLER statements lose their effect.

Parameter restriction: r_min < r_max

Examples:

RADIUS

1.1,

1.15

RADIUS

0.9,

1.15

CYLIND

3.0,

1.0

CYLIND

3.0,

1.0

152

ArchiCAD 11 GDL Reference Guide

Attributes

RESOL

RESOL n

Sets smoothness for cylindrical elements and arcs in polylines. Circles are converted to regular polygons having n sides. Arc conversion is proportional to this.

After a RESOL statement, any previous RADIUS and TOLER statements lose their effect.

Parameter restriction: n >= 3

Default:

RESOL 36

Examples:

RESOL 5

RESOL 36

CYLIND 3.0, 1.0

CYLIND 3.0, 1.0

ArchiCAD 11 GDL Reference Guide

153

Attributes

TOLER

TOLER d

Sets smoothness for cylindrical elements and arcs in polylines. The error of the arc approximation (i.e., the greatest distance between the theoretical arc and the generated chord) will be smaller than d.

After a TOLER statement, any previous RADIUS and RESOL statements lose their effect.

Examples:

TOLER 0.01

TOLER 0.1

CYLIND 3.0, 1.0

CYLIND 3.0, 1.0

Note: The RADIUS, RESOL and TOLER directives set smoothness for cylindrical 3D elements (CIRCLE, ARC, CYLIND, SPHERE, ELLIPS, CONE, ARMC, ARME, ELBOW, REVOLVE) and arcs in 2D polylines using curved edges.

See “Additional Status Codes” on page 141.

PEN

PEN n

Sets the color.

Parameter restriction:

0 < n <= 255

Default:

PEN 1

if there is no PEN statement in the script.

(For library parts, default values come from the library part’s settings. If the script refers to a non existing index, PEN 1 becomes the default setting.)

154

ArchiCAD 11 GDL Reference Guide