30.07.2013 Views

T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Upon creating any variable of the T-<strong>FLEX</strong> <strong>CAD</strong>, it is necessary to indicate:<br />

Variables<br />

− a unique name of the given variable which enables to uniquely identify it in the document and also<br />

determine the type of the given variable (text or real);<br />

− expression, based on which the system will calculate the current value of the variable.<br />

Moreover, there is also a number of additional characteristics of variables, which can be specified in case of<br />

need. Several of them enable to impart additional properties to the variables (for example, the indication of<br />

external variable). Others are used exclusively for simplifying the work with a large number of variables in<br />

the document (comment of variable, group of variable).<br />

Rules for assigning variables' names<br />

The name of any T-<strong>FLEX</strong> <strong>CAD</strong> variable must represent itself a string of characters. The letters, numbers and<br />

the character “_” (underlining) can be used in the name. There is no limitation on the length of the variable's<br />

name.<br />

The variable's name determines the type of the variable: real or text. The type of the variable shows what sort<br />

of values the given variable may take. The type is determined by the first character in the name of the<br />

variable. The name of the real variable must start with the letter, text variable – with the symbol $.<br />

Examples of correct variable names:<br />

VAR1; VVVVVVVVVV; VAR_1; $TEXT; WIDTH; width;<br />

Note that the two last variable names are considered different, as the names are case-sensitive. Local<br />

language extensions of US ASCII are supported for the names. Local language users shall keep in mind that<br />

some language characters (particularly, Cyrillic and Greek) resemble the standard US ASCII, while their<br />

system codes may be different. Therefore, care should be taken in entering names, as the system will not<br />

recognize a name with the same appearance yet actually composed of different characters.<br />

Examples of inappropriate variable names:<br />

1_VAR (the first character is not a letter);<br />

!_VAR! (inadmissible “!” character is used);<br />

V A R (the name may not contain “space” characters).<br />

Expression for variable<br />

An expression is specified for each variable so that the system could calculate the value of the variable at<br />

any moment of time. An expression – is a mathematical formula, containing standard algebraic operations,<br />

logical operations, conditional operations, calls to mathematical functions and the T-<strong>FLEX</strong> <strong>CAD</strong> functions,<br />

various constants (real or character, depending on the type of variable), the values of other variables. As a<br />

result of the expression calculation, the value of the variable is obtained.<br />

The rules for composing expressions for the T-<strong>FLEX</strong> <strong>CAD</strong> variables and description of the<br />

functions that can be used inside the expressions are described in the Attachment I of this chapter.<br />

Upon specifying the expression for the variable, the type of the variables should be taken into account. Real<br />

variables can take only numeric values (12; 125; -234; 781.234; 3.834e+6), text variables –<br />

only character values (“Text”; “String”; “Name”).<br />

An expression can represent itself just a constant (numeric or character depending on the type of variable).<br />

Variables-functions<br />

Besides various mathematical and special functions, predetermined in the system, upon compose the<br />

expressions for the variables, it is possible to define and use user's own functions. For example, if, upon<br />

467

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

Saved successfully!

Ooh no, something went wrong!