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

NON-GEOMETRIC SCRIPTS

In addition to the 3D and 2D script windows that define the appearance of the GDL Object, further scripts are available for adding complementary information to it. These are the Properties Script used for quantity calculations, the Parameter Script that includes the list of possible values for different parameters, and the User Interface Script for creating a custom interface for parameter entry. The commands available for all these script types are detailed on the following pages.

THE PROPERTIES SCRIPT

Library parts have a GDL window reserved for the Properties script. This script allows you to make library part properties dependent on parameters, and, through a directive, define their place in the final component list. By using a few commands, it is possible to define in the script local descriptors and components (created in the Properties windows of earlier ArchiCAD versions). Descriptors and components from external databases can also be referenced. Code lengths cannot exceed 32 characters.

In the Properties script, you can use any GDL command that does not generate a shape.

DATABASE_SET

DATABASE_SET set_name [descriptor_name, component_name, unit_name, key_name, criteria_name, list_set_name]

Database set definition or Database set selection. If this command is placed in a MASTER_GDL script, it will define a Database set containing Descriptor, Component, Unit, Key, Criteria and List Scheme files.

This Database set name can then be referenced from Properties Scripts using the same command with only the set_name parameter as a directive, by selecting the actual Database set that REF COMPONENTs and REF DESCRIPTORs refer to. The default Database set name is “Default Set”, and will be used if no other set has been selected. The default Database set file names are: DESCDATA, COMPDATA, COMPUNIT, LISTKEY, LISTCRIT, LISTSET.

Scripts can include any number of DATABASE_SET selections. set_name: Database set name

descriptor_name: Descriptor data file name component_name: Component data file name unit_name: Unit data file name

key_name: Key data file name criteria_name: Criteria file name list_set_name: List Scheme file name

ArchiCAD 11 GDL Reference Guide

179

Non-Geometric Scripts

DESCRIPTOR

DESCRIPTOR name [,code, keycode]

Local descriptor definition. Scripts can include any number of DESCRIPTORs.

name: can extend to more than one line. New lines can be defined by the character ‘\n’ and tabulators by ‘\t’. Adding ‘\’ to the end of a line allows you to continue the string in the next line without adding a new line. Inside the string, if the ‘\’ character is doubled (\\), it will lose its control function and simply mean ‘\’.

The length of the string (including the new line characters) cannot exceed 255 characters: additional characters will be simply cut by the compiler. If you need a longer text, use several DESCRIPTORs.

code: string, defines a code for the descriptor

keycode: string, reference to a key in an external database.

The key will be assigned to the descriptor.

REF DESCRIPTOR

REF DESCRIPTOR code [, keycode]

Reference by code and keycode string to a descriptor in an external database.

COMPONENT

COMPONENT name, quantity, unit [, proportional_with, code, keycode, unitcode]

Local component definition. Scripts can include any number of COMPONENTs. name: the name of the component (max. 128 characters)

quantity: a numeric expression

unit: the string used for unit description

proportional_with: a code between 1 and 6. When listing, the component quantity defined above will be automatically multiplied by a value calculated for the current listed element:

1:item

2:length

3:surface A

4:surface B

5:surface

6:volume

code: string, defines a code for the component

keycode: string, reference to a key in an external database. The key will be assigned to the component.

unitcode: string, reference to a unit in an external database that controls the output format of the component quantity. This will replace the locally defined unit string.

180

ArchiCAD 11 GDL Reference Guide

Non-Geometric Scripts

REF COMPONENT

REF COMPONENT code [, keycode [, numeric_expression]]

Reference by code and keycode string to a component in an external database. The value to multiply by in the component database can be overwritten by the optional numeric expression specified here.

BINARYPROP

BINARYPROP

Binaryprop is a reference to the binary properties data (components and descriptors) defined in the library part in the Components and Descriptors sections.

DATABASE_SET directives have no effect on the binary data.

SURFACE3D ( )

SURFACE3D ( )

The Surface 3D () function gives you the surface of the 3D shape of the library part.

Warning: If you place two or more shapes in the same location with the same parameters, this function will give you the total sum of all shapes’ surfaces.

VOLUME3D ( )

VOLUME3D ( )

The Volume 3D () function gives you the volume of the 3D shape of the library part.

Warning: If you place two or more shapes in the same location with the same parameters, this function will give you the total sum of all shapes’ volumes.

POSITION

POSITION position_keyword

Effective only in the Component List.

Changes only the type of the element the following descriptors and components are associated to. If there are no such directives in the Properties script, descriptors and components will be listed with their default element types.

Keywords are the following:

WALLS

COLUMNS

BEAMS

DOORS

WINDOWS

ArchiCAD 11 GDL Reference Guide

181