T-FLEX Parametric CAD. Fundamentals. 2D Design
T-FLEX Parametric CAD. Fundamentals. 2D Design T-FLEX Parametric CAD. Fundamentals. 2D Design
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
- Page 450 and 451: Moving and Copying Drawing Elements
- Page 452 and 453: Moving and Copying Drawing Elements
- Page 454 and 455: ELEMENT REPLACEMENT Element Replace
- Page 456 and 457: Element Replacement When using the
- Page 458 and 459: Select the dimension and enter the
- Page 460 and 461: Drawing Modification via Dimensions
- Page 462 and 463: Relations created with the commands
- Page 464 and 465: Relations The created Relations wil
- Page 466 and 467: Variables and Related Parametric To
- Page 468 and 469: Upon creating any variable of the T
- Page 470 and 471: Comment of variable Variables If ne
- Page 472 and 473: Creating Variable In the variables
- Page 474 and 475: Variables The command “New Variab
- Page 476 and 477: Variables the selected section. The
- Page 478 and 479: Variables After calling this comman
- Page 480 and 481: Variables Color. The color of grid
- Page 482 and 483: Variables To activate the mode of g
- Page 484 and 485: Variables Sort parameters are saved
- Page 486 and 487: Variables Upon calling this command
- Page 488 and 489: Editing External Variables Variable
- Page 490 and 491: Call the command “EC: Edit Constr
- Page 492 and 493: Variable Dependency Variables Varia
- Page 494 and 495: Variables Attachment I. Rules for W
- Page 496 and 497: Variables -23 % -5 = -3 23 % -5 = 3
- Page 498 and 499: Variables The angle arguments of tr
- Page 502 and 503: Variables The detailed description
- Page 504 and 505: LTOT ( 120.34567, 0.001, 1, 5 ) ret
- Page 506 and 507: for text: “WIDTH” - the text wi
- Page 508 and 509: for loop: “AxisX”, “AxisY”,
- Page 510 and 511: Variables One more additional relat
- Page 512 and 513: Variables BOMPAGES - returns the to
- Page 514 and 515: Measure Elements and Relations betw
- Page 516 and 517: Additional Methods of Calling Comma
- Page 518 and 519: Hatches: Text: 3D objects “AREA
- Page 520 and 521: Loops: Measure Elements and Relatio
- Page 522 and 523: GLOBAL VARIABLES Global Variables A
- Page 524 and 525: DATABASES Databases Databases provi
- Page 526 and 527: Databases Name of the field. Define
- Page 528 and 529: Databases argument_3 - the search o
- Page 530 and 531: Save Database As External Keyboard
- Page 532 and 533: Duplicate Keyboard Textual Menu Ico
- Page 534 and 535: Databases decides what function to
- Page 536 and 537: Control Elements. Creating User Def
- Page 538 and 539: Control Elements. Creating User Def
- Page 540 and 541: Control Elements. Creating User Def
- Page 542 and 543: Control Elements. Creating User Def
- Page 544 and 545: Control Elements. Creating User Def
- Page 546 and 547: Use of the Dialog Control Elements.
- Page 548 and 549: Parametricity of Custom Dialogs Con
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