Difference between revisions of "Obtain"
From ArcoWiki
(Created page with "The <Code>OBTAIN/</code> commandis used to get a value from a feature.<br/> The parameter is chosen by using its position inside the definition statement.<br/> It is important...") |
|||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | The <Code>OBTAIN/</code> commandis used to get a value from a feature.<br/> | + | The <Code>OBTAIN/</code> commandis used to [[Get a Value from a Feature|get a value from a feature]].<br/> |
The parameter is chosen by using its position inside the definition statement.<br/> | The parameter is chosen by using its position inside the definition statement.<br/> | ||
It is important to consider the differences between <code>F(label)</code> and <code>FA(label)</code> or <code>S(label)</code> and <code>SA(label)</code>. | It is important to consider the differences between <code>F(label)</code> and <code>FA(label)</code> or <code>S(label)</code> and <code>SA(label)</code>. | ||
Line 39: | Line 39: | ||
::<code>EVAL/FA(PO1),TA(TP)<br/></code> | ::<code>EVAL/FA(PO1),TA(TP)<br/></code> | ||
::<code>tol_value=OBTAIN/TA(TP),3<br/></code> | ::<code>tol_value=OBTAIN/TA(TP),3<br/></code> | ||
+ | |||
+ | |||
+ | [[it:Ottenere]] | ||
+ | [[zh-cn:获得]] | ||
+ | [[pt:Obtivermos]] | ||
+ | [[de:Erhalten]] | ||
+ | [[es:Obtener]] | ||
+ | [[en:Obtain]] | ||
+ | |||
+ | [[Category:Dmis_Tutorial]] |
Latest revision as of 14:54, 12 June 2018
The OBTAIN/
commandis used to get a value from a feature.
The parameter is chosen by using its position inside the definition statement.
It is important to consider the differences between F(label)
and FA(label)
or S(label)
and SA(label)
.
Examples:
$$ Example of Obtain Command
F(POI_1)=FEAT/POINT,CART,1.111,2.222,3.333,0,0,1
F(POI_2)=FEAT/POINT,CART,4.444,5.555,6.666,0,0,1
F(POI_3)=FEAT/POINT,CART,7.777,8.888,9.999,0,0,1
FA(POI_1)=FEAT/POINT,CART,1.111,2.222,3.333,0,0,1
FA(POI_2)=FEAT/POINT,CART,4.444,5.555,6.666,0,0,1
FA(POI_3)=FEAT/POINT,CART,7.777,8.888,9.999,0,0,1
</br>
DECL/INTGR,I
DECL/CHAR,20,elnm
DECL/DOUBLE,xx,yy,zz
$$ Do Loop upon the three point above
DO/i,1,3
elnm=ASSIGN/CONCAT('poi_',STR(i))
$$ Third value from the FA(POI_X)
xx=OBTAIN/FA(@elnm),3
yy=OBTAIN/FA(@elnm),4
zz=OBTAIN/FA(@elnm),5
elnm=ASSIGN/CONCAT('newpoi_',STR(i))
F(@elnm)=FEAT/POINT,CART, xx,yy,zz, 0,0,0
FA(@elnm)=FEAT/POINT,CART, xx,yy,zz, 0,0,0
ENDDO
Use EVAL/
instead of OUTPUT/
to get the value of a tolerance without creating the output of it.
Examples:
$$ Example of the use of EVAL
DECL/DOUBLE,tol_value
T(TP)=TOL/POS,2D,1.0000
$$ Evaluation of the T(TP) in the PO1 feature without the output
EVAL/FA(PO1),TA(TP)
tol_value=OBTAIN/TA(TP),3