www.mxdraw.com
|
向指定的块表记录添加一个自定义实体。
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