T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design T-FLEX Parametric CAD. Fundamentals. 2D Design

scp.s.scptuj.mb.edus.si
from scp.s.scptuj.mb.edus.si More from this publisher
30.07.2013 Views

Variables TWORD(“string”, N) Get a word from a string. $NAME=TWORD(“William Henry Gates”, 2) – results in assigning the value Henry to the variable $NAME. WARN(“STRING”)or WARN(“STRING”,”element name”) Database Management Functions Display a user-defined message “STRING” in the diagnostics window. Include the element name in the message. DBF(arg1, arg2, arg3) A dBASE database query. arg1 – database name. The database name can be defined by a string constant, variable or expression. arg2 – the name of the field to copy from. The field name can be defined by a string constant, variable or expression. arg3 – the condition for copying. The condition can be defined by a string constant, variable or expression. DBFWIN(arg1, arg2, arg3) FIND(database_field, condition_1, condition_2, ...) MDB(arg1, arg2, arg3, arg4) A dBASE database query. Also converts text from DOS to WINDOWS format. Is used for correct handling of local language text. The parameters are analogous to those of the function dbf. Get a value from the internal database The function returns the value of the specified field database_field of a record satisfying the conditions condition_1, condition_2. If no suitable record exists, the function outputs the error message “Wrong record number”. An Access database request. arg1 - database name. The database name can be defined by a string constant, variable or expression. arg2 -the table name in the database. Can be defined by a string constant, variable or expression. arg3 - the name of the field to copy from. The field name can be defined by a string constant, variable or expression. arg4 - the condition for copying. The condition can be defined by a string constant, variable or expression. For example: mdb ( "c:\\T-FLEX_USER.mdb", "USER", "FULLNAME", "Code ={kod}" ) This means: select the value from the table “USER” of the database “T-FLEX_USER” from the field “FULLNAME” under condition that the value of the field “Code” is equal to the value of the variable kod. 499

Fundamentals. Two-Dimensional Design 500 It is worth noting that the last operand of the function, specifying condition for record selection, can be written in the form of SQL query and then it must correspond to the WHERE clause of the SELECT command. If, upon writing the condition, the text variables are used, the expression will take the following form: mdb ( "c:\\T-FLEX_USER.mdb", "USER", "FULLNAME", "Post=\"{$Dol}\"" ). REC(condition) Get the Id of a record in the internal database. condition – a logical expression, taking values True or False. The expression may contain members – queries to the fields of the database. FREC(arg1, arg2, arg3, arg4) VAL(record_number, database_field) Get the Id of a record in the internal database or in the database by reference, where the value in the specified column matches most closely the specified value. arg1 – a database column, in which the search is performed. Must be of real or integer type; arg2 –sought value; arg3 –search option. Possible values: 0 –find nearest value; -1 –find nearest lesser value; 1 –find nearest greater value. arg4 –defines the column type to perform the search (the order in which the values occur in this column): 0 -the values are not in order; the search is performed over all database records; 1 –the values in the column are ordered ascending or descending. Once the difference between the value sought and the value in the current column of the database is greater than in the previous one, the search completes. The parameters arg3 and arg4 are optional. If these are skipped, the default values are used: arg3 = 0; search for nearest value; arg4 = 0; column not ordered; Get the value from the internal database by the record Id. record_number -an arbitrary arithmetical expression, that yields an integer. database_field -a field query. #. Get the number of records in the specified internal database

Variables<br />

TWORD(“string”, N) Get a word from a string.<br />

$NAME=TWORD(“William Henry Gates”, 2) – results in<br />

assigning the value Henry to the variable $NAME.<br />

WARN(“STRING”)or<br />

WARN(“STRING”,”element<br />

name”)<br />

Database Management Functions<br />

Display a user-defined message “STRING” in the diagnostics<br />

window. Include the element name in the message.<br />

DBF(arg1, arg2, arg3) A dBASE database query.<br />

arg1 – database name. The database name can be defined by a<br />

string constant, variable or expression.<br />

arg2 – the name of the field to copy from. The field name can be<br />

defined by a string constant, variable or expression.<br />

arg3 – the condition for copying. The condition can be defined by<br />

a string constant, variable or expression.<br />

DBFWIN(arg1, arg2,<br />

arg3)<br />

FIND(database_field,<br />

condition_1,<br />

condition_2, ...)<br />

MDB(arg1, arg2, arg3,<br />

arg4)<br />

A dBASE database query. Also converts text from DOS to<br />

WINDOWS format. Is used for correct handling of local language<br />

text.<br />

The parameters are analogous to those of the function dbf.<br />

Get a value from the internal database<br />

The function returns the value of the specified field<br />

database_field of a record satisfying the conditions<br />

condition_1, condition_2. If no suitable record exists, the function<br />

outputs the error message “Wrong record number”.<br />

An Access database request.<br />

arg1 - database name. The database name can be defined by a<br />

string constant, variable or expression.<br />

arg2 -the table name in the database. Can be defined by a string<br />

constant, variable or expression.<br />

arg3 - the name of the field to copy from. The field name can be<br />

defined by a string constant, variable or expression.<br />

arg4 - the condition for copying. The condition can be defined by<br />

a string constant, variable or expression.<br />

For example:<br />

mdb ( "c:\\T-<strong>FLEX</strong>_USER.mdb", "USER", "FULLNAME",<br />

"Code ={kod}" )<br />

This means: select the value from the table “USER” of the database<br />

“T-<strong>FLEX</strong>_USER” from the field “FULLNAME” under condition<br />

that the value of the field “Code” is equal to the value of the<br />

variable kod.<br />

499

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!