CAD由一个自定义实体事件中的id得到自定义实体对象(com接口VB语言)
2020-12-13 01:45
标签:bsp tar ber cin ring text x11 order The 由一个自定义实体事件中的id得到自定义实体对象。该函数只能在自定义实体事件中调用。 CAD由一个自定义实体事件中的id得到自定义实体对象(com接口VB语言) 标签:bsp tar ber cin ring text x11 order The 原文地址:https://www.cnblogs.com/yzy0224/p/11007979.html
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
文章标题:CAD由一个自定义实体事件中的id得到自定义实体对象(com接口VB语言)
文章链接:http://soscw.com/essay/24150.html