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.

Variables<br />

The detailed description of T-<strong>FLEX</strong> <strong>CAD</strong> functions follows below. The database managing functions<br />

description are also available in the chapter “Databases”.<br />

Examples of function uses:<br />

sin ( 30 ) = 0.5<br />

min ( 5, 67, 34, 28, 0.67 ) = 0.67<br />

SQrt ( 16 ) = 4<br />

As evident in the last example, the function naming is case-insensitive.<br />

Using Functions ATOT (), LTOT (), SATOT (), SLTOT ()<br />

Attachment II. Examples of Using Some Functions<br />

These four functions are intended for converting numerical values to character strings in a specified format.<br />

The conversion format is similar to that used for converting the nominal dimension values.<br />

The function SATOT () converts a real number of an angular value into a string of text. The conversion<br />

parameters are defined by the settings of the “ST: Set Model Status” command on the Dimensions tab.<br />

The function SATOT () specifically uses the definitions from the “Angular<br />

Dimensions” group. Suppose, the following parameters are defined in the “ST:<br />

Set Model Status” command.<br />

In this case, calling SATOT (120.34567) leads to the following result:<br />

12%%d30’<br />

The character combination %%d stands for the degree symbol (°).<br />

In order to realize this character combination as the degree symbol, the variable must be used as a parameter<br />

of some detailing element, such as a text (string text only), dimension, leader note, etc.<br />

Let’s clarify the above on the following example. Suppose, the following value is assigned to the variable<br />

$str by the function call:<br />

$str = SATOT ( 120.34567 ) = 120%%30’<br />

We will then create a dimension with the “Before” string containing the variable in braces instead of the<br />

default. The following result will then be displayed:<br />

The variables that are assigned return values of such functions can also be entered (in braces) in string text.<br />

Such text will then be correctly displayed as well.<br />

Modifying the Units parameter in the command “ST: Set Model Status” as<br />

shown leads to the following result:<br />

SATOT ( 120.34567 ) returns → 120.5%%d<br />

501

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

Saved successfully!

Ooh no, something went wrong!