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

MISCELLANEOUS

GDL can also handle a number of operations on external files through special Add-On applications. The commands used to achieve this are described in this chapter and illustrated with an example.

GLOBAL VARIABLES

The global variables make it possible to store special values of the model. This allows you to access geometric information about the environment of the GDL macro. For example, you can access the wall parameters when defining a window which has to fit into the wall. Global variables are not stacked during macro calls.

For doors, windows, labels and property library parts there is one more possibility to communicate with ArchiCAD through fix named, optional parameters. These parameters, if present on the library part's parameter list, are set by ArchiCAD. See the list of fix named parameters and more details in the Basic Library documentation http://www.graphisoft.com/support/developer/documentation/LibraryDevDoc/11.

General environment information

GLOB_SCRIPT_TYPE

T~

type of current script

1-property script, 2-2D script, 3-3D script, 4-user interface script, 5-parameters script, 6-master script

GLOB_CONTEXT

context of appearance

1-library part editor, 2-floor plan, 3-3D view, 4-section/elevation, 5-settings dialog, 6-list, 7 - detail drawing, 8 - layout, 22 - feedback mode from the floor plan, 23 - feedback mode from a 3Dview, 24 - feedback mode from a section/elevation, 28 - feedback mode from a layout, 43 - generating as an operator from a 3D view, 44 - generating as an operator from a section/elevation, 46 - generating as an operator from a list

GLOB_SCALE

A_

drawing scale

according to the current window

 

 

GLOB_DRAWING_BGD_PEN

 

pen of the drawing background color

the best matching pen from the current palette to the background color of the current window

GLOB_NORTH_DIR

U~

project North direction

relative to the default project coordinate system according to the settings made in the Sun... dialog

GLOB_WORLD_ORIGO_OFFSET

Position of the project origin relative to the world origin. See “Example illustrating the usage of the GLOB_WORLD_ORIGO_... globals:” on page 240.

GLOB_MODPAR_NAME

name of the last modified parameter

in the settings dialog or library part editor, including parameters modified through editable hotspots. Valid only in parameter scripts.

GLOB_UI_BUTTON_ID

id of the button pushed on the UI page

or 0, if the last action was not the push of a button with id.

GLOB_CUTPLANES_INFO [4] -

array of 4 length values: 1: cutplane height, 2: cutplane top level, 3: cutplane bottom level, 4: absolute display limit, in the library part’s local coordinate system. See details in AC Set Floor Plan Cutplane dialog.

ArchiCAD 11 GDL Reference Guide

223

Miscellaneous

Story information

GLOB_HSTORY_ELEV

B_

elevation of the home story

home story is the one the object is placed on

 

GLOB_HSTORY_HEIGHT Q_

height of the home story

home story is the one the object is placed on

 

GLOB_CSTORY_ELEV

Q~

elevation of the current story

current story is the one currently shown in the Floor Plan window

GLOB_CSTORY_HEIGHT R~

height of the current story

current story is the one currently shown in the Floor Plan window

GLOB_CH_STORY_DIST

S~

relative position of the current story to the home story

current story is the one currently shown in the Floor Plan window

Fly-through information

 

 

 

 

GLOB_FRAME_NR

N_

current frame number in animation

valid only for animation, 0 for still images

 

 

 

 

GLOB_FIRST_FRAME

O_

first frame index in fly-through

valid only for animation, 0 for still images

 

 

 

 

GLOB_LAST_FRAME

P_

last frame index in fly-through

valid only for animation, 0 for still images

 

 

 

 

GLOB_EYEPOS_X

K~

current camera position (x)

valid only in perspective projection for both animation and still images

 

 

 

GLOB_EYEPOS_Y

L~

current camera position (y)

valid only in perspective projection for both animation and still images

 

 

 

GLOB_EYEPOS_Z

M~

current camera position (z)

valid only in perspective projection for both animation and still images

 

 

 

GLOB_TARGPOS_X

N~

current target position (x)

valid only in perspective projection for both animation and still images

 

 

 

GLOB_TARGPOS_Y

O~

current target position (y)

valid only in perspective projection for both animation and still images

 

 

 

GLOB_TARGPOS_Z

P~

current target position (z)

valid only in perspective projection for both animation and still images

 

 

 

GLOB_SUN_AZIMUTH

 

sun azimuth

according to the settings in the Sun... dialog box

 

 

 

 

GLOB_SUN_ALTITUDE

 

sun altitude

according to the settings in the Sun... dialog box

 

 

 

 

224

ArchiCAD 11 GDL Reference Guide

Miscellaneous

General element parameters

GLOB_LAYER

 

layer of the element

name of the layer the element is assigned to

 

 

 

 

GLOB_ID

 

user ID of the element

ID as set in the settings dialog box

 

 

 

 

GLOB_INTGUID

 

internal GUID of the element, the internal GUID generated by the program

(cannot be controlled by the user)

 

 

 

 

GLOB_ELEVATION

J_

base elevation of the element

relative to the home story (excluding door, window: sill height, according to current settings)

 

 

 

GLOB_ELEM_TYPE

 

element type, for labels and property objects contains the type of the parent element

0 - none (individual label),

1-object, 2-lamp, 3-window, 4-door, 5-wall, 6-column, 7-slab, 8-roof, 9-fill, 10-mesh, 11-zone, 12 - beam

 

 

 

Object, Lamp, Door, Window parameters

SYMB_LINETYPE

 

line type of the library part

applied as the default line type of the 2D symbol

 

 

 

 

 

SYMB_FILL

 

fill type of the library part

applied on cut surfaces of library parts in section/elevation windows

 

 

 

 

SYMB_FILL_PEN

 

pen of the fill of the library part

applied on cut surfaces of library parts in section/elevation windows

 

 

 

 

SYMB_FBGD_PEN

 

pen of the background of the fill of the library part

applied on cut surfaces of library parts in section/elevation windows

 

 

 

 

SYMB_SECT_PEN

 

pen of the library part in section

applied on contours of cut surfaces of library parts in section/elevation windows

 

 

 

SYMB_VIEW_PEN

L_

default pen of the library part

applied on all edges in 3D window and on edges on view in section/elevation windows

 

 

 

SYMB_MAT

M_

default material of the library part

 

 

 

SYMB_POS_X

X~

position of the library part (x)

relative to the project origin (excluding door, window and wall end: relative to the startpoint of the including wall)

 

 

 

SYMB_POS_Y

Y~

position of the library part (y)

relative to the project origin (excluding door, window and wall end: relative to the startpoint of the including wall) Note: see “Doors and Windows” on page 253 specials for orientation of Y and Z axes

SYMB_POS_Z

Z~

position of the library part (z)

relative to the project origin (excluding door, window and wall end: relative to the startpoint of the including wall) Note: see “Doors and Windows” on page 253 specials for orientation of Y and Z axes

ArchiCAD 11 GDL Reference Guide

225

Miscellaneous

Object, Lamp parameters

SYMB_ROTANGLE

W~

rotation angle of the library part

numeric rotation from within the settings dialog is performed around the current anchor point

 

 

 

SYMB_MIRRORED

V~

library part mirrored

0-no , 1-yes (mirroring is performed around the current anchor point.) Always 0 for wall ends, except when the origin of the local coordinate system is in a non-rectangular vertex of a trapezoidal wall’s polygon.

Object, Lamp, Door, Window parameters - available for listing and labels only

SYMB_A_SIZE

nominal length/width of library part

length of object/lamp, width of window/door (fixed parameter)

 

 

 

SYMB_B_SIZE

nominal width/height of library parts

width of object/lamp, height of window/door (fixed parameter)

 

 

 

Object, Lamp parameters - available for listing and labels only

SYMB_Z_SIZE

nominal height of the library part

if a user parameter is named in zzyzx format then it will be used for nominal height, otherwise 0

226

ArchiCAD 11 GDL Reference Guide