www.mxdraw.com
内容索引主面
前一个向上下一个
MxDrawXCustomEvent::MxDrawXCustomEntity::explode 方法

把自定义实体,变成普通实体

IDL
static void MxDrawXCustomEntity::explode(LONGLONG lEntity, LONGLONG lBlkRecId) const;
参数 
说明 
LONGLONG lEntity 
自定义实体id. 
LONGLONG lBlkRecId 
用来临时普通实体的块表记录id. 

例如: VB

            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
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!