Difference between revisions of "Sending Variable to Output Using DMIS Code"

From ArcoWiki
Jump to: navigation, search
(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,Deviation
NominalValue=ASSIGN/10
MeasuredValue=ASSIGN/10.5
Deviation=ASSIGN/MeasuredValue-NominalValue

$$


$$
$$Section 2: Preparing the tolerances

DECL/DOUBLE,utol,ltol
utol=ASSIGN/0.1
ltol=ASSIGN/-0.1
DECL/DOUBLE,oot
DECL/CHAR,200,msg
IF/(Deviation.GT.utol)
oot=ASSIGN/Deviation-utol
ENDIF
IF/(Deviation.LT.ltol)
oot=ASSIGN/Deviation-ltol
ENDIF
msg=ASSIGN/STR(oot,13,4)

$$


$$
$$Section 3: Creating the output string with formatting

DECL/CHAR,500,strOut,strout1
strout1=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,strout1
TEXT/OUTFIL,strout

$$