资源描述:
《DMIS语言简易教程》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、DMIS语言简易教程2007-09-1713:15:20(已经被浏览386次)DMIS4.0简单教程几何元素F(CIRC3)=FEAT/CIRCLE,INNER,CART,-32.5000,38.3494,-25.0000,0.0000,0.0000,1.0000,10.0000MEAS/CIRCLE,F(CIRC3),3PTMEAS/CART,-32.5000,33.3494,-25.0000,0.0000,1.0000,0.0000PTMEAS/CART,-36.8301,40.8494,-25.000
2、0,0.8660,-0.5000,0.0000PTMEAS/CART,-28.1699,40.8494,-25.0000,-0.8660,-0.5000,0.0000ENDMESF(CIRC3)=FEAT/CIRCLE,INNER,CART,-32.5000,38.3494,-25.0000,0.0000,0.0000,1.0000,10.0000“MEAS”指令表示一个测量过程的开始。如果系统处在“MODE/AUTO”状态下,那么系统将自动测量下面的空间点。如果系统的状态是“MODE/PROG”,则PTM
3、EAS将无须干预地将指定的点测量完毕。MEAS/CIRCLE,F(CIRC3),3“PTMEAS”指令只是指明需要测量的点的坐标和触测的方向。PTMEAS/CART,-28.1699,40.8494,-25.0000,-0.8660,-0.5000,0.0000“ENDMES”指令将结束点的测量,然后计算结果。DECL变量定义DECL/CHAR,80,TCDIRSDECL/INTGR,TCNSLTDECL/DOUBLE,TCDIFX,TCDIFY,TCDIFZDECL/CHAR,80,RESULTS[10]
4、DECL/CHAR,80,RESULTS[10,5]通过“DECL”指令,可以定义各种变量DECL/INTGR,INDDECL/CHAR,80,RESULTS[10]DO/IND,1,10,1RESULTS[IND]=ASSIGN/''ENDDO可以定义以下类型的变量:BOOLCHARINTGRREALVECTORLONG这些变量的有效范围可以是:COMMONGLOBALLOCALASSIGN变量赋值在DMIS中进行变量赋值并不像只用“=”号那样简单TCDIRS=ASSIGN/'C:ProgrammiC
5、oord3ARCOData'TCNSLT=ASSIGN/6TEXT提示信息TEXT/OPER,'MAKESURETHEPARTISONTHEFIXTURE'textOPERmustbeclosedpressingoKTEXT/MAN,'MEASUPPERHOLE'textMANdisappearautomaticallywhenyoumeasurethe1stpoint数据输入TEXT/QUERY,(NMVAR),20,A,L,'Writeyourname'提取数据把一个变量赋值为任何一个参数的定义。
6、不要忘了“F”和“FA”、“S”、“SA”的区别:语句中的序号代表元素定义中数据位置:F(POI_1)=FEAT/POINT,CART,1.111,2.222,3.333,0,0,0F(POI_2)=FEAT/POINT,CART,4.444,5.555,6.666,0,0,0F(POI_3)=FEAT/POINT,CART,7.777,8.888,9.999,0,0,0FA(POI_1)=FEAT/POINT,CART,1.111,2.222,3.333,0,0,0FA(POI_2)=FEAT/POINT
7、,CART,4.444,5.555,6.666,0,0,0FA(POI_3)=FEAT/POINT,CART,7.777,8.888,9.999,0,0,0DECL/INTGR,iDECL/CHAR,20,elnmDECL/DOUBLE,xx,yy,zzDO/i,1,3elnm=ASSIGN/CONCAT('poi_',STR(i))xx=OBTAIN/FA(@elnm),3yy=OBTAIN/FA(@elnm),4zz=OBTAIN/FA(@elnm),5elnm=ASSIGN/CONCAT('newpo
8、i_',STR(i))F(@elnm)=FEAT/POINT,CART,xx,yy,zz,0,0,0FA(@elnm)=FEAT/POINT,CART,xx,yy,zz,0,0,0ENDDO使用“EVAL”而不是使用“OUTPUT”时,可以在不输出该数据的情况下,得到需要的数据。DECL/DOUBLE,tol_valueT(TP)=TOL/POS,2D,1.0000EVAL/FA(COORD3),TA(TP)to