主要用到函数说明:

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

最新文章

  1. CreateJSのTweenJS、SoundJS、PreloadJS
  2. 最小的N个和(codevs 1245)
  3. 解决fontawesome-webfont 被拦截的问题
  4. RedHat安装GCC问题-解决依赖问题
  5. Linux 块设备驱动 (一)
  6. Struts2五、Struts1与Struts2的区别
  7. Effective C++:条款14:在中小企业资源管理copying表现
  8. 使用PHP操作ElasticSearch
  9. ext window嵌jsp页面自适应
  10. 统计一个数据库中,无记录的表的sql语句
  11. UML图之时序图
  12. 桌面小部件Wight父类AppWidgetProvider的三个方法
  13. 我的2017&2018
  14. Vue 系列之 基础入门
  15. java基础篇---线程问题
  16. MySQL解析过程、执行过程
  17. maven加载本地jar
  18. php 性能优化
  19. HTML标签img--改变图片尺寸
  20. Elasticsearch 2.4.1 Bigdesk 插件安装

热门文章

  1. SpringMVC导出Excel
  2. [转] Ubuntu/Linux Mint/Debian 安装 Java 8
  3. karaf增加自己定义log4j的配置
  4. 4.7.5 Efficient Construction of LALR Parsing Tables
  5. 重装Eclipse 往其中加Python插件时 遇到不能独立运行c c++ python 代码时修改办法:
  6. java笔记线程电影院卖票最终版
  7. bzoj 1700: [Usaco2007 Jan]Problem Solving 解题【dp】
  8. Left Join 时筛选条件在on后与where后的区别
  9. GG_Logs 日志类库封装使用说明
  10. MySQL性能优化神器Explain