CAD把自定义实体,变成普通实体(com接口VB语言)
2024-08-30 21:21:00
主要用到函数说明:
MxDrawXCustomEvent::MxDrawXCustomEntity::explode
把自定义实体,变成普通实体,详细说明如下:
参数 | 说明 |
---|---|
LONGLONG lEntity |
自定义实体id |
LONGLONG lBlkRecId |
用来临时普通实体的块表记录id |
代码实现如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
If sEventName = "MxDrawXCustomEntity::explode" Then Dim param66 As MxDrawResbuf Set param66 = MxDrawX1.CustomEventParam() Dim lBlockRecId As Long lBlockRecId = param66.AtLong(1) Dim customEntity As MxDrawCustomEntity Set customEntity = MxDrawX1.CallEx( "Mx_GetCustomEntity" , param66) If customEntity.IsHave( "startpoint" ) Then Else Exit Sub End If If customEntity.IsHave( "endpoint" ) Then Else Exit Sub End If Set database = MxDrawX1.GetDatabase Dim blkRec As MxDrawBlockTableRecord Set blkRec = database.ObjectIdToObject(lBlockRecId) Dim sPt As MxDrawPoint Dim ePt As MxDrawPoint Set sPt = customEntity.GetPoint( "startpoint" ) Set ePt = customEntity.GetPoint( "endpoint" ) blkRec.AddLine sPt, ePt End If |
最新文章
- CreateJSのTweenJS、SoundJS、PreloadJS
- 最小的N个和(codevs 1245)
- 解决fontawesome-webfont 被拦截的问题
- RedHat安装GCC问题-解决依赖问题
- Linux 块设备驱动 (一)
- Struts2五、Struts1与Struts2的区别
- Effective C++:条款14:在中小企业资源管理copying表现
- 使用PHP操作ElasticSearch
- ext window嵌jsp页面自适应
- 统计一个数据库中,无记录的表的sql语句
- UML图之时序图
- 桌面小部件Wight父类AppWidgetProvider的三个方法
- 我的2017&;2018
- Vue 系列之 基础入门
- java基础篇---线程问题
- MySQL解析过程、执行过程
- maven加载本地jar
- php 性能优化
- HTML标签img--改变图片尺寸
- Elasticsearch 2.4.1 Bigdesk 插件安装
热门文章
- SpringMVC导出Excel
- [转] Ubuntu/Linux Mint/Debian 安装 Java 8
- karaf增加自己定义log4j的配置
- 4.7.5 Efficient Construction of LALR Parsing Tables
- 重装Eclipse 往其中加Python插件时 遇到不能独立运行c c++ python 代码时修改办法:
- java笔记线程电影院卖票最终版
- bzoj 1700: [Usaco2007 Jan]Problem Solving 解题【dp】
- Left Join 时筛选条件在on后与where后的区别
- GG_Logs 日志类库封装使用说明
- MySQL性能优化神器Explain