RationalDMIS 2020 图形报告“注释"使用变量
RationalDMIS 7.1 快速添加输出文本(输出注释说明)
1.打开“自学习程序”模式
快捷键Ctrl+Q
2.新建一个整型变量
在变量数据区中创建一个新变量(注意: 变量也可以在DMIS程序中直接声明定义)可以通过变量父节点的右键菜单来完成.
在右键菜单中选择"新建",就会弹出变量声明对话框,见下图:
定义变量名;NAN
3.变量名右键——选择要哪种交互方式:文本、图片、声音...
选择需要显示的图片
DECL/COMMON,INTGR,NAN
NAN = PROMPT/PICTURE, 'C:\RationalDMIS64\Image\1.jpg'
界面输入
界面输入的关键字是PROMPT,例如
DECL/CHAR,20,List_var1
DECL/DOUBLE,edit_var1,edit_var2,edit_var3
DECL/INTGR,Check_var1,Check_var2,Check_var3
Tempchar = Prompt/Title,'孔测量程序',$
Text,'孔的数量',edit,edit_var1,$
Text,'孔的直径',edit,edit_var2,$
Text,'直径公差带',edit,edit_var3,$
List,List_var1,'直角坐标系','极坐标系',$
Check,'位置度',Check_var1,Check,'圆度',Check_var2,Check,'
直径公差',Check_var3
运行结果如下图
附注:
RationalDMIS程序编辑区右键模版里面——其他——文本提示——PROMPT/PICTURE ,里面有显示图片提示的模版供拖放参考
$$/* Header
UNITS/MM, ANGDEC, MMPS
WKPLAN/XYPLAN
PRCOMP/ON
TECOMP/ON
FLY/1.0000
MODE/MAN
SNSET/APPRCH, 2.0000
SNSET/RETRCT, 2.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, 15.0000
RECALL/D(MCS)
SNSLCT/S(L20-D1.0)
GEOALG/BF, LSTSQR
GEOALG/ANGLB, DEFALT
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
$$
$$*/
$$ TEXT/OPER, '粗建坐标系!'
MODE/MAN
F(PLN1)=FEAT/PLANE,CART,31.2887,31.3792,0.0000,0.0000,0.0000,1.0000
$$ Measurement points are created through actual points
MEAS/PLANE, F(PLN1), 3
PTMEAS/CART, 25.5370, 77.1498, 0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 6.6366, 8.9779, 0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 61.6927, 8.0100, 0.0000, 0.0000, 0.0000, 1.0000
ENDMES
D(CRD1) = DATSET/FA(PLN1), ZDIR
F(LN1)=FEAT/LINE,BND,CART,5.9123,0.0000,-2.3494,61.4287,0.0000,-2.3748,0.0000,-1.0000,0.0000
$$ Measurement points are created through actual points
MEAS/LINE, F(LN1), 2
PTMEAS/CART, 5.9123, 0.0000, -2.3494, 0.0000, -1.0000, 0.0000
PTMEAS/CART, 61.4287, 0.0000, -2.3748, 0.0000, -1.0000, 0.0000
ENDMES
F(PT1)=FEAT/POINT,CART,0.0000,5.0924,-3.0804,-1.0000,0.0000,0.0000
MEAS/POINT, F(PT1), 1
PTMEAS/CART, 0.0000,5.0924,-3.0804,-1.0000,0.0000,0.0000
ENDMES
D(CRD2) = DATSET/FA(PLN1), ZDIR, ZORIG, FA(LN1), XDIR, YORIG, FA(PT1), XORIG
D(CRD2) = TRANS/ZORIG, -0, YORIG, -0, XORIG, -0
$$ Set.CAD2PCS.CADM_1
$$ Set.CADViewCenter.CADM_1
$$ TEXT/OPER, '精建坐标系!'