![]() | Note |
---|---|
Functions may occur in conditions and allocations of numerical variables. IF (L1.LT.SQRT(25)) THEN ...
Examples Assignment of number variables: D3=LOGL1
A=(B+5)*3-10/2
C=SQRT(A**2+B**2)
|
IF () THEN VAR = ELSE VAR = ENDIF
IF (....): Enter the condition between the brackets () (e.g. "<Variable>.EQ.10").
THEN: After THEN <variable> =, enter the value that the variable should assume if the condition is met.
ELSE ...: After ELSE <variable> = is the value for the variable if the condition is not met.
ELSEIF (....): Between IF and ELSE, any number of distinction of cases can be added.
IF (L1.EQ.10) THEN D3 = 20 ELSE D3 = 30 ENDIF
IF (L1.EQ.10) THEN D3 = 10 ELSEIF (L1.EQ.20) THEN D3 = 20 ELSE D3 = 30 ENDIF
The // operator makes it possible to link variable values with a text (or other variable values).
TYPE=‘new‘//TYPE
CONC = ABC//'0'//PQR//XYZ
In PARTdesigner the use of variables within a string works:
C= 'Test --- $A.-$B.'
NENN = '$H.x$B.x$L.'
This does NOT work with ERP mapping, so the use of the // operator is particularly helpful here.
Inverse functions to above mentioned:
text = GETTHREADTEXT (number,text,text,number) |
Using the following expression you can generate different output. NAME = GETTHREADTEXT(D,'DIN 13','',P,'NAME')
A detailed description can be found under Section 7.9.3.14.1.1.2, “Various thread pitches and derived automatic calculations for e.g. line description and core diameter ”. |
Number = GETTHREADVALUE (number,text,text,number) |
Compare the preceding function GETTHREADTEXT gets a text from the table and GETTHREADVALUE a DOUBLE value. |
TRANSLATE translates a text into the current language. Also see Section 7.8.12.7, “ Translation functions” -> Example 1 |
However, if you want to use the visible, translated value in the line description [Row label], data sheet [Data sheet], 2D derivation, etc., you can use the "TRANSLATE(VARIABLENNAME)" function. Also see Section 7.8.12.7, “ Translation functions” -> Example 2 and 3 |
Also see Section 7.8.12.7, “ Translation functions” -> Example 4 |