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相关推荐

  1. 代码创建多重引线样式和绘制多重引线

    using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.Colors; using Autodesk.AutoCAD.Da ...

  2. cad.net 多重引线

    多重引线只需要两个点(只用选择起始位置和终止位置),引线则需要三个点- AutoCAD二次开发(.Net)之多重引线(MLeader)创建 https://blog.csdn.net/qq_21489 ...

  3. 绘图的尺寸_Auto CAD机械绘图尺寸标注教程10(标注多重引线)

    引线标注方式使引线说明的文字一起标注,引线对象是一条线或样条曲线,其一端带有箭头,也可无箭头:另一端带有多行文字对象或块,在某些情况下,有一条短水平线(又称为基线)将文字或块和特征控制框连接到引线上. ...

  4. AUTOCAD——多重引线样式

    创建和修改可用于创建多重引线对象的样式. 执行方式 命令行:MLEADERSTYLE 菜单栏:格式→多重引线样式 多重引线工具栏:多重引线样式图标 "多重引线样式操作命令位置"界面 ...

  5. .net创建CAD多重引线,引线中顶点修改问题

    在利用SetVertex方法修改多重引线的顶点坐标,基线设置的前后顺序会影响到最终的修改效果. 在设置完多重引线的MText后,要先设置DoglegLength值,再创建引线,最后修改引线顶点. 

  6. autocad.net

    AutoCAD.net nuget 搜索autocad.net System.InvalidProgramException异常错误 autocad.net通过组件方式访问autocad,所以需要和a ...

  7. cad线性标注命令_CAD常用标注快捷键和命令

    点击上方 "CAD自学网 "  → 点击右上角"..." → 点选"设为星标 ★ " 为CAD自学网加上星标,即可及时收到干货啦! 左下角阅 ...

  8. AutoCAD 2019 常用命令速查手册

    AutoCAD 2019 常用命令速查手册 目 录 3D 命令 - 13 3DALIGN 13 3DARRAY 13 3DCONFIG 13 3DDISTANCE 14 3DDWF 14 3DFACE ...

  9. 你想要的Window、Office办公快捷键都在这

    每个模块的展示方式不同是为了让大家分辨哪些快捷键对应某个模块哦 FN快捷键 按键 功能 F1 帮助 F2 重命名 F3 在windows中搜索文件 F4 打开IE中的地址栏列表 F5 刷新 F6 在窗 ...

最新文章

  1. 决策树算法(一)——一些重要的数学概念
  2. 工作报告总是写不好?表达不准确?试试这个写作方法
  3. LCD12864示例子程序
  4. ESP8266的MQTT客户端搭建教程(基于NONS_SDK_v2.0)
  5. 使一个div垂直+水平居中的几种方法
  6. 解决git bash右键菜单消失的问题
  7. 基于pygame的贪吃蛇游戏
  8. 那个抗血栓机器人_礼来抗血栓药物普拉格雷(Effient)不及波利维(Plavix)
  9. 【剑指offer】面试题09:用两个栈实现队列(Java)
  10. ZUI – 开源HTML5跨屏框架
  11. datatime,time,string转换和format格式化处理
  12. linux g++ undefined reference to `dlopen'类问题
  13. PHPExcel导出excel 复制代码
  14. 隐藏了十年的 Sudo 漏洞曝出:无需密码就能获取 root 权限
  15. ajax如何向action发送数据的
  16. 计算机恢复失败有杀毒,360安全卫士电脑清理结束不了,系统修复结束不了,木马查杀开始不了,电脑体检结束不了。怎么回事?...
  17. linux多进程分割大文件,Linux中split大文件分割和cat合并文件详解
  18. java 快逸报表_报表展现输出 | 快逸报表工具 java报表软件
  19. 华为盒子EC6110-T-通刷-免拆刷机固件及教程
  20. 沟通CTBS物流行业远程接入解决方案

热门文章

  1. Arch Linux 的安装配置
  2. 手把手教你如何使用AI绘画:Stable-Diffusion本地化部署及使用教程
  3. 青空の霞光Java新特性笔记
  4. win8的计算机在哪个地方,Win8系统中的关机在电脑哪个位置
  5. 计算机四级c语言试题,计算机四级考试习题
  6. Android井字棋
  7. mysql ssd 刷脏_MySQL-Innodb-批量刷脏的场景
  8. 消息队列的实现原理和ActiveMQ详解
  9. 具有最佳性价比的Mac
  10. csv导入mysql乱码问题