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

Non-Geometric Scripts

UI_INFIELD

UI_INFIELD "name", x, y, width, height [, method, picture_name, images_number,

rows_number, cell_x, cell_y, image_x, image_y, expression_image1, text1,

...,

expression_imagen, textn]

UI_INFIELD {2}

UI_INFIELD{2} name, x, y, width, height [, method, picture_name, images_number,

rows_number, cell_x, cell_y, image_x, image_y, expression_image1, text1,

...,

expression_imagen, textn]

UI_INFIELD{3}

UI_INFIELD{3} name, x, y, width, height [, method, picture_name,

images_number,

rows_number, cell_x, cell_y, image_x, image_y,

expression_image1, text1, value_definition1,

...,

expression_imagen, textn, value_definitionn]

Generates an edit text or a pop-up menu for the parameter input. A pop-up is generated if the parameter type is value list, material, fill, line type or pencolor.

If the optional parameters of the command are present, value lists can be alternatively displayed as thumbnail view fields. Different thumbnail control types are available. They display the specified images and associated texts and allow the selection of one single item at a time, just like in a pop-up menu.

In the version 1 and 2 infield, the thumbnail items and the value list items are associated by indices.

The version 3 infield defines value association which binds the thumbnail items to value list items of the associated parameter. If a value defined in a thumbnail item isn't present in the parameter's value list, it won't be displayed in the control.

The Interface Script is rebuilt with the new value after any parameter is modified.

ArchiCAD 11 GDL Reference Guide

189

Non-Geometric Scripts

name: parameter name as string expression for UI_INFIELD or parameter name with optional actual index values if array for UI_INFIELD{2}

x, y: the position of the edit text, pop-up or control width, height: width and height in pixels

method: the type of the thumbnail control

1:List view control

2:Popup menu control

3:Popup icon radio control

4:Push icon radio control

picture_name: name of the common image file containing a matrix of concatenated images, or empty string images_number: number of images in the matrix

rows_number: number of rows of the matrix

cell_x, cell_y: width and height of a cell within the thumbnail view field, including image and text image_x, image_y: width and height of the image in the cell

expression_imagei: index of image number i in the matrix, or individual file name. If a common image file name was specified, indices must be used here. Combination of indices and individual file names does not work.

texti: text in cell number i

value_definitioni: value definition which matches the cell with a value list item by value: expression: numerical or string expression, or

CUSTOM: keyword, meaning that any custom value can be entered

190

ArchiCAD 11 GDL Reference Guide

Non-Geometric Scripts

Example 1:

IF c THEN

UI_DIALOG "Hole definition parameters" UI_OUTFIELD "Type of hole:",15,40,180,20 UI_INFIELD "D",190,40,105,20

IF D="Rectangular" THEN

UI_PICT "rect.pict",110,33,60,30 UI_OUTFIELD "Width of hole",15,70,180,20 UI_INFIELD "E", 190,70,105,20

UI_OUTFIELD "Height of hole",15,100,180,20 UI_INFIELD "F", 190,100,105,20 UI_OUTFIELD "Distance between

holes",15,130,180,20 UI_INFIELD "G", 190,130,105,20

ELSE

UI_PICT "circle.pict",110,33,60,30 UI_OUTFIELD "Diameter of hole

circle",15,70,180,20 UI_INFIELD "J", 190,70,105,20 UI_OUTFIELD "Distance of hole

centers",15,100,180,20 UI_INFIELD "K", 190,100,105,20 UI_OUTFIELD "Resolution of hole

circle",15,130,180,20 UI_INFIELD "M", 190,130,105,20

ENDIF

UI_OUTFIELD "Number of holes",15,160,180,20 UI_INFIELD "I", 190,160,105,20

ENDIF

UI_SEPARATOR 50,195,250,195

UI_OUTFIELD "Material of beam", 15,210,180,20 UI_INFIELD "MAT", 190,210,105,20

UI_OUTFIELD "Pen of beam", 15,240,180,20 UI_INFIELD "P", 190,240,105,20

ArchiCAD 11 GDL Reference Guide

191

Non-Geometric Scripts

Example 2:

! Parameter Script:

VALUES "myParameter" "Two", "Three", "Five", CUSTOM

! Interface Script: px = 80

py = 60

cx = px + 3 cy = py + 25

UI_INFIELD{3} "myParameter", 10, 10, 4 * cx + 21, cy + 5, 1, "myPicture", 6,

1, cx, cy, px, py, 1, "1 - one", "One", 2, "2 - two", "Two",

3, "3 - three", "Three", 4, "4 - four", "Four", 5, "5 - five", "Five",

6, "custom value", CUSTOM

192

ArchiCAD 11 GDL Reference Guide