Difference between revisions of "Sending Variable to Output Using DMIS Code"
From ArcoWiki
(Created page with "This code example is used to send a calculated variable to output applying a tolerance as it was a measured feature.<br /> <code><span style="color: green; text-decoratio...") |
|||
| (One intermediate revision by one other user not shown) | |||
| Line 42: | Line 42: | ||
::<code>TEXT/OUTFIL,strout</code> | ::<code>TEXT/OUTFIL,strout</code> | ||
<code><span style="color: green; text-decoration: none;">$$</span><br/></code> | <code><span style="color: green; text-decoration: none;">$$</span><br/></code> | ||
| + | |||
| + | |||
| + | [[it:Invio di variabili all'output mediante il codice DMIS]] | ||
| + | [[zh-cn:使用DMIS代码发送变量到输出]] | ||
| + | [[pt:Envio de variáveis para saída usando o código DMIS]] | ||
| + | [[de:Senden der Variablen an die Ausgabe mit DMIS-Code]] | ||
| + | [[es:Enviar variable a la salida usando el código DMIS]] | ||
| + | [[en:Sending Variable to Output Using DMIS Code]] | ||
[[Category:Dmis_Tutorial]] | [[Category:Dmis_Tutorial]] | ||
Latest revision as of 09:53, 15 June 2018
This code example is used to send a calculated variable to output applying a tolerance as it was a measured feature.
$$
$$Section 1: Preparing the Variable, this is to be substituted by an actual calculation of the required variable
DECL/DOUBLE,NominalValue,MeasuredValue,DeviationNominalValue=ASSIGN/10MeasuredValue=ASSIGN/10.5Deviation=ASSIGN/MeasuredValue-NominalValue
$$
$$
$$Section 2: Preparing the tolerances
DECL/DOUBLE,utol,ltolutol=ASSIGN/0.1ltol=ASSIGN/-0.1DECL/DOUBLE,ootDECL/CHAR,200,msgIF/(Deviation.GT.utol)oot=ASSIGN/Deviation-utol
ENDIFIF/(Deviation.LT.ltol)oot=ASSIGN/Deviation-ltol
ENDIFmsg=ASSIGN/STR(oot,13,4)
$$
$$
$$Section 3: Creating the output string with formatting
DECL/CHAR,500,strOut,strout1strout1=ASSIGN/'LABEL NOMINAL ACTUAL DEVIATION LOWER TOL. UPPER TOL. OOT'strout=ASSIGN/CONCAT('DIST ',STR(NominalValue,14,4),STR(MeasuredValue,14,4),STR(Deviation,14,4),STR(ltol,14,4),STR(utol,14,4),msg)
$$
$$
$$Section 4: Sending to Output
TEXT/OUTFIL,strout1TEXT/OUTFIL,strout
$$