如何向指定的块表记录添加一个自定义实体?
VB开发|黄洪辉|2018-05-30 10:02
-
回答:
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
-
回答:
主要用到函数说明:
MxDrawXCustomFunction::Mx_AddCustomEntity
向指定的块表记录添加一个自定义实体,详细说明如下:
参数 说明 LPCTSTR pszBlkRecName = NULL
块表记录名称,为空取控件当前显示空间的id