首页/文章/ 详情

RationalDMIS变量和数组功能

1年前浏览668

前言:


    一枚叶子落在窗台上, 阳光在深情地亲吻着它。 很多时候仰望枝头的叶子,却感觉不到落叶的真实。青年人,要学习,进步着。。。。


   使用声明变量对话框,有可能同时声明若干个变量。一次性声明若干个变量,允许您去指定变量数组。


      这些在创建字符串数列的时候很有用,或者,在管理多维特征数据数列的时候也有用,但是,它们只能被有限的一些命令所使用,例如DECL 和 ASSIGN,可以在程序循环中使用字符串数组来增加特征名称,存储特征名称到变量中。


多维数组


知识点:


多维数组可以被用于分隔特征数据。


   例如,将点特征数据从圆特征数据中分隔出来。数据能够被更加细分,例如,从外圆特征数据将内圆特征数据分离出来。下面的程序样本代码,将点特征数据从圆特征数据中分离出来:





$$ 程序代码


TEXT/OPER, '多维数组功能!!'

$$

MODE/AUTO,PROG,MAN

SNSET/APPRCH, 3.0000

SNSET/RETRCT, 3.0000

SNSET/DEPTH, 0.0000

SNSET/SEARCH, 10.0000

SNSET/CLRSRF, F(PLN2), 20.0000

DECL/COMMON,INTGR,I

DECL/COMMON,CHAR,255,arraynames[5,6]

DECL/COMMON,CHAR,255,names1

DECL/COMMON,CHAR,255,names2

DECL/COMMON,CHAR,255,names3

DECL/COMMON,CHAR,255,names4

DECL/COMMON,CHAR,255,names5

DECL/COMMON,CHAR,255,names6


DO/I,1,3,1

arraynames[I,1] = ASSIGN/CONCAT('圆1','-',STR(I))

arraynames[I,2] = ASSIGN/CONCAT('圆2','-',STR(I))

arraynames[I,3] = ASSIGN/CONCAT('圆3','-',STR(I))

arraynames[I,4] = ASSIGN/CONCAT('圆4','-',STR(I))

arraynames[I,5] = ASSIGN/CONCAT('圆5','-',STR(I))

arraynames[I,6] = ASSIGN/CONCAT('点','-',STR(I))


ENDDO


$$ 程序代码!


$$


DO/I,1,3,1

names1 = ASSIGN/arraynames[I,1]

names2 = ASSIGN/arraynames[I,2]

names3 = ASSIGN/arraynames[I,3]

names4 = ASSIGN/arraynames[I,4]

names5 = ASSIGN/arraynames[I,5]

names6 = ASSIGN/arraynames[I,6]


F(@names1)=FEAT/CIRCLE,INNER,CART,56.4897,22.6394,0.0000,-0.0000,0.0000,1.0000, 13.0000


$$ Empty Meas Block

MEAS/CIRCLE, F(@names1), 4


ENDMES

F(@names2)=FEAT/CIRCLE,INNER,CART,103.5094,22.6378,0.0000,-0.0000,0.0000,1.0000, 13.0000


$$ Empty Meas Block

MEAS/CIRCLE, F(@names2), 4


ENDMES

F(@names3)=FEAT/CIRCLE,INNER,CART,113.2862,65.8180,0.0000,-0.0000,-0.0000,1.0000, 13.0000


$$ Empty Meas Block

MEAS/CIRCLE, F(@names3), 4


ENDMES

F(@names4)=FEAT/CIRCLE,INNER,CART,80.0018,95.0029,0.0000,0.0000,-0.0000,1.0000, 13.0000


$$ Empty Meas Block

MEAS/CIRCLE, F(@names4), 4


ENDMES

F(@names5)=FEAT/CIRCLE,INNER,CART,41.9593,67.3611,0.0000,0.0000,-0.0000,1.0000, 13.0000


$$ Empty Meas Block

MEAS/CIRCLE, F(@names5), 4


ENDMES

F(@names6)=FEAT/POINT,CART,49.6379,50.7145,0.0000,0.0000,-0.0000,1.0000


$$ Empty Meas Block

MEAS/POINT, F(@names6), 1


ENDMES


D(CRD3) = TRANS/XORIG, 300


ENDDO


RECALL/D(CRD2)

$$ Set.CAD2PCS.CADM_1

$$ Set.CADViewCenter.CADM_1

来源:RationalDMIS测量技术
3DEC
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2023-07-01
最近编辑:1年前
山涧果子
大专 签名征集中
获赞 203粉丝 48文章 1203课程 0
点赞
收藏
未登录
还没有评论
课程
培训
服务
行家
VIP会员 学习 福利任务 兑换礼品
下载APP
联系我们
帮助与反馈