www.mxdraw.com
内容索引主面
前一个向上下一个
MxDrawXCustomFunction::Mx_AddCustomEntity 方法

向指定的块表记录添加一个自定义实体。

IDL
static MxDrawCustomEntity* Mx_AddCustomEntity(LPCTSTR pszBlkRecName = NULL);
参数 
说明 
LPCTSTR pszBlkRecName = NULL 
块表记录名称。,为空取控件当前显示空间的id. 

返回新增加的自定义实体.

例如: VB代码

                Private Sub Command38_Click()
                Dim newObj As MxDrawCustomEntity
                Set newObj = MxDrawX1.Call("Mx_AddCustomEntity", "")
                If (newObj Is Nothing) Then
                    MsgBox "失败"
                    Exit Sub
                End If

                Dim sPt  As MxDrawPoint
                Dim ePt  As MxDrawPoint

                Set sPt = New MxDrawPoint
                Set ePt = New MxDrawPoint

                sPt.x = 10
                sPt.y = 20

                ePt.x = 40
                ePt.y = 80

                newObj.SetPoint "startpoint", sPt
                newObj.SetPoint "endpoint", ePt
                MxDrawX1.UpdateDisplay
                End Sub
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!