CAD得到自定义实体拖放夹点(com接口VB语言)

时间:2019-06-11
本文章向大家介绍CAD得到自定义实体拖放夹点(com接口VB语言),主要包括CAD得到自定义实体拖放夹点(com接口VB语言)使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

主要用到函数说明:

MxDrawXCustomEvent::MxDrawXCustomEntity::getGripPoints

自定义实体事件,得到拖放夹点,详细说明如下:

参数说明

LONGLONG lEntity

自定义实体id

OUT AcGePoint3dArray& gripPoints

返回要拖放的夹点

VB代码实现如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
            If sEventName = "MxDrawXCustomEntity::getGripPoints" Then
 
            Dim param77 As MxDrawResbuf
            Set param77 = MxDrawX1.CustomEventParam()
 
 
            Set customEntity = MxDrawX1.CallEx("Mx_GetCustomEntity", param77)
 
 
            Set sPt = customEntity.GetPoint("startpoint")
            Set ePt = customEntity.GetPoint("endpoint")
 
 
 
            param77.RemoveAll
 
 
            param77.AddPoint sPt
            param77.AddPoint ePt
            MxDrawX1.CallEx "Mx_SetEventRetEx", param77
 
 
            End If

原文地址:https://www.cnblogs.com/yzy0224/p/11003361.html