ObjectARX_多重引线MLeader
2019独角兽企业重金招聘Python工程师标准>>>
(1)getLeaderIndexes 函数:得到引线的索引
getLeaderIndexes 函数的定义形式为:
Acad::ErrorStatus getLeaderIndexes( AcArray<int>& leaderIndexes) const;
第一个参数:leaderIndexes:引线索引
(2)getLeaderLineIndexes 函数:得到引线的箭头线的索引
getLeaderLineIndexes 函数的定义形式为:
Acad::ErrorStatus getLeaderLineIndexes( AcArray<int>& leaderLineIndexes) const;
第一个参数: leaderLineIndexes:引线的箭头线的索引
Acad::ErrorStatus getLeaderLineIndexes(int leaderIndex, AcArray<int>& leaderLineIndexes) const;
第一个参数:leaderIndex:引线索引
第二个参数:leaderLineIndexes:引线的箭头线的索引
(3)getFirstVertex :函数:获取引线的箭头线的箭头起点
getFirstVertex 函数的定义形式为:
Acad::ErrorStatus getFirstVertex( int leaderLineIndex, AcGePoint3d& point) const;
第一个参数:leaderLineIndex:引线的箭头线索引
第二个参数:point:箭头起点
(4)getLastVertex :函数:获取引线的箭头线的箭头的尾点
getLastVertex 函数的定义形式为:
Acad::ErrorStatus getLastVertex( int leaderLineIndex, AcGePoint3d& point) const;
第一个参数:leaderLineIndex:引线的箭头线索引
第二个参数:point:箭头尾点
(5)numVertices :函数:获取引线的箭头线上顶点数
numVertices 函数的定义形式为:
Acad::ErrorStatus numVertices(int leaderLineIndex, int& num) const;
第一个参数:leaderLineIndex:引线的箭头线索引
第二个参数:num:箭头线的顶点数
(6)getVertex :函数:获取引线的箭头线上顶点的位置
getVertex 函数的定义形式为:
Acad::ErrorStatus getVertex(int leaderLineIndex, int index, AcGePoint3d& point) const;
第一个参数:leaderLineIndex:引线的箭头线索引
第二个参数: index:顶点的索引
第三个参数:point:顶点位置
(7)getTextLocation: 函数:获取多行文本的位置
getTextLocation 函数的定义形式为:
Acad::ErrorStatus getTextLocation(AcGePoint3d& location) const;
第一个参数: location:多行文本的位置
(8)enableDogleg : 函数:是否启用基线
enableDogleg 函数的定义形式为:
bool enableDogleg() const;
返回值:true:启用基线,flase:没有基线
(9)getDoglegDirection 函数:基线的方向
getDoglegDirection 函数的定义形式为:
Acad::ErrorStatus getDoglegDirection( int leaderIndex, AcGeVector3d& vector) const;
第一个参数:leaderIndex:引线索引
第二个参数:vector:基线方向的单位向量
(10)doglegLength :函数:基线的长度
doglegLength 函数的定义形式为:
Acad::ErrorStatus doglegLength(int leaderIndex, double& doglegLength) const;
第一个参数:leaderIndex:引线索引
第二个参数:doglegLength:基线长度
具体用法如例:
OdDbMLeader* pMLeader ; OdGePoint3d textPoint;pMLeader->getTextLocation(textPoint);OdIntArray leaderIndexes;pMLeader->getLeaderIndexes(leaderIndexes);for (int nLeaderIndex = 0; nLeaderIndex < leaderIndexes.size(); ++nLeaderIndex){OdGePoint3d firstPoint,lastPoint;OdIntArray leaderLineIndexes;pMLeader->getLeaderLineIndexes(nLeaderIndex, leaderLineIndexes); for (int nLeaderLineIndex = 0; nLeaderLineIndex < (int)leaderLineIndexes.size(); ++nLeaderLineIndex){pMLeader->getFirstVertex(nLeaderLineIndex,firstPoint);pMLeader->getLastVertex(nLeaderLineIndex,lastPoint);int num = 0;OdGePoint3d ptTemp;pMLeader->numVertices(nLeaderLineIndex,num);for (int nVertex = 1; nVertex < num - 1; ++nVertex){pMLeader->getVertex(nLeaderLineIndex, num, ptTemp);}}//基线if (pMLeader->enableDogleg()){OdGeVector3d vecDogleg;pMLeader->getDoglegDirection(nLeaderIndex,vecDogleg);double dDogleg = pMLeader->doglegLength();OdGePoint3d doglegPoint = lastPoint + vecDogleg * dDogleg;OdGePoint3d doglegMidPoint = (lastPoint + doglegPoint.asVector())/2.0;}}
转载于:https://my.oschina.net/u/2930533/blog/3018915
ObjectARX_多重引线MLeader相关推荐
- 代码创建多重引线样式和绘制多重引线
using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.Colors; using Autodesk.AutoCAD.Da ...
- cad.net 多重引线
多重引线只需要两个点(只用选择起始位置和终止位置),引线则需要三个点- AutoCAD二次开发(.Net)之多重引线(MLeader)创建 https://blog.csdn.net/qq_21489 ...
- 绘图的尺寸_Auto CAD机械绘图尺寸标注教程10(标注多重引线)
引线标注方式使引线说明的文字一起标注,引线对象是一条线或样条曲线,其一端带有箭头,也可无箭头:另一端带有多行文字对象或块,在某些情况下,有一条短水平线(又称为基线)将文字或块和特征控制框连接到引线上. ...
- AUTOCAD——多重引线样式
创建和修改可用于创建多重引线对象的样式. 执行方式 命令行:MLEADERSTYLE 菜单栏:格式→多重引线样式 多重引线工具栏:多重引线样式图标 "多重引线样式操作命令位置"界面 ...
- .net创建CAD多重引线,引线中顶点修改问题
在利用SetVertex方法修改多重引线的顶点坐标,基线设置的前后顺序会影响到最终的修改效果. 在设置完多重引线的MText后,要先设置DoglegLength值,再创建引线,最后修改引线顶点.
- autocad.net
AutoCAD.net nuget 搜索autocad.net System.InvalidProgramException异常错误 autocad.net通过组件方式访问autocad,所以需要和a ...
- cad线性标注命令_CAD常用标注快捷键和命令
点击上方 "CAD自学网 " → 点击右上角"..." → 点选"设为星标 ★ " 为CAD自学网加上星标,即可及时收到干货啦! 左下角阅 ...
- AutoCAD 2019 常用命令速查手册
AutoCAD 2019 常用命令速查手册 目 录 3D 命令 - 13 3DALIGN 13 3DARRAY 13 3DCONFIG 13 3DDISTANCE 14 3DDWF 14 3DFACE ...
- 你想要的Window、Office办公快捷键都在这
每个模块的展示方式不同是为了让大家分辨哪些快捷键对应某个模块哦 FN快捷键 按键 功能 F1 帮助 F2 重命名 F3 在windows中搜索文件 F4 打开IE中的地址栏列表 F5 刷新 F6 在窗 ...
最新文章
- 决策树算法(一)——一些重要的数学概念
- 工作报告总是写不好?表达不准确?试试这个写作方法
- LCD12864示例子程序
- ESP8266的MQTT客户端搭建教程(基于NONS_SDK_v2.0)
- 使一个div垂直+水平居中的几种方法
- 解决git bash右键菜单消失的问题
- 基于pygame的贪吃蛇游戏
- 那个抗血栓机器人_礼来抗血栓药物普拉格雷(Effient)不及波利维(Plavix)
- 【剑指offer】面试题09:用两个栈实现队列(Java)
- ZUI – 开源HTML5跨屏框架
- datatime,time,string转换和format格式化处理
- linux g++ undefined reference to `dlopen'类问题
- PHPExcel导出excel 复制代码
- 隐藏了十年的 Sudo 漏洞曝出:无需密码就能获取 root 权限
- ajax如何向action发送数据的
- 计算机恢复失败有杀毒,360安全卫士电脑清理结束不了,系统修复结束不了,木马查杀开始不了,电脑体检结束不了。怎么回事?...
- linux多进程分割大文件,Linux中split大文件分割和cat合并文件详解
- java 快逸报表_报表展现输出 | 快逸报表工具 java报表软件
- 华为盒子EC6110-T-通刷-免拆刷机固件及教程
- 沟通CTBS物流行业远程接入解决方案