DMIS程序数据区,记录语句。
多个元素求同一个公差,定义好一个点轮廓度公差标签【如下图操作】,然后拖放多个元素到“公差标签”上。选择“使用此公差的拷贝”
变量数据区“整数”标签鼠标右键,弹出菜单;
获取评价的公差数:
KNPTN1 = VALUE/TOL,ALL
获取超差数:
KNPTN2 = VALUE/TOL.OUTOL
DMIS程序数据区,记录DMIS语句。
定义一个循环整型变量I,一个字符变量C1,一个整型数组变量P[4]
DO有限循环,变量计数。
一个元素同时计算多种公差的快捷操作
按住Ctr1键或者Shift键多选公差标签,将选中的公差标签拖放到数据区元素名称上:
判断公差值是否超差,超差为0,不超差为1 。
P[1] = VALUE/TA(TCOR4),INTOL
IF条件语句,进行判断计数。
定义两个整型变量KNPTN4,KNPTN5。
光标所在行开始运行:
计数DMIS模板
$$ 以下为输出报告语句
T(TCOR1)=TOL/CORTOL,XAXIS,-0.0300,0.0300
T(TCOR2)=TOL/CORTOL,YAXIS,-0.0300,0.0300
T(TCOR3)=TOL/CORTOL,ZAXIS,-0.0300,0.0300
T(TPFP1)=TOL/PROFP,-0.0300,0.0300
T(TPFP1_点-1_1)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(点-1),TA(TPFP1_点-1_1)
T(TPFP1_点-2_1)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(点-2),TA(TPFP1_点-2_1)
T(TPFP1_点-3_1)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(点-3),TA(TPFP1_点-3_1)
T(TPFP1_点-4_1)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(点-4),TA(TPFP1_点-4_1)
T(TPFP1_点-5_1)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(点-5),TA(TPFP1_点-5_1)
T(TPFP1_点-6_1)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(点-6),TA(TPFP1_点-6_1)
T(TPFP1_GR-1_1)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(GR-1),TA(TPFP1_GR-1_1)
T(TPFP1_GR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)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(MP-7),TA(TPFP1_MP-7_1)
T(TPFP1_MP-8_1)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(MP-8),TA(TPFP1_MP-8_1)
T(TPFP1_MP-9_1)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(MP-9),TA(TPFP1_MP-9_1)
T(TPFP1_MP-10_1)=TOL/PROFP,-0.0300,0.0300
OUTPUT/FA(MP-10),TA(TPFP1_MP-10_1)
$$ 变量数据区,对点元素进行总数统计,以及超差数统计。
KNPTN1 = VALUE/TOL,ALL
KNPTN2 = VALUE/TOL,OUTOL
$$ 对圆进行坐标公差定义,直径公差定义。
T(TCOR4)=TOL/CORTOL,XAXIS,-0.0200,0.0200
T(TCOR5)=TOL/CORTOL,YAXIS,-0.0200,0.0200
T(TCOR6)=TOL/CORTOL,ZAXIS,-0.0200,0.0200
T(TDM1)=TOL/DIAM,0.0000,0.0200
DECL/COMMON,INTGR,I
DECL/COMMON,CHAR,255,C1
DECL/COMMON,INTGR,P[4]
DO/I,1,5,1
C1 = ASSIGN/CONCAT('Φ13-',STR(I))
OUTPUT/FA(@C1) ,TA(TCOR4)
OUTPUT/FA(@C1) ,TA(TCOR5)
OUTPUT/FA(@C1) ,TA(TCOR6)
OUTPUT/FA(@C1) ,TA(TDM1)
P[1] = VALUE/TA(TCOR4),INTOL
P[2] = VALUE/TA(TCOR5),INTOL
P[3] = VALUE/TA(TCOR6),INTOL
P[4] = VALUE/TA(TDM1),INTOL
IF/(P[1] .EQ.0).OR.(P[2].EQ.0).OR.(P[3].EQ.0).OR.(P[4].EQ.0)
KNPTN3 = ASSIGN/1+KNPTN3
ENDIF
ENDDO
$$
$$
DECL/COMMON,INTGR,KNPTN4
DECL/COMMON,INTGR,KNPTN5
$$特征总数=点的总数+圆的总数
KNPTN4 = ASSIGN/KNPTN1+5
$$ 超差数=点的超差数+圆的超差数
KNPTN5 = ASSIGN/KNPTN2+KNPTN3
①PDF模板设计器打开路径如下图:
②打开一个PDF模板
③使用变量控制报告表头
使用变量:
如果想用程序实时更新图形报告表头的信息,就要使用Dynamic Name的变量功能,在Dynamic Name(绿色框)中输入VARIABLE::name,name代表用户自定义的变量名称。
④另存为一个模板