怎会呢? Sub TEST() Dim objText As AcadText Dim dataType(0 To 1) As Integer Dim data(0 To 1) As Variant dataType(0) = 1001: data(0) = "XData" dataType(1) = 1000: data(1) = "123" Dim ptinsert(2) As Double ptinsert(0) = 100: ptinsert(1) = 100: ptinsert(2) = 0 Set objText = ThisDrawing.ModelSpace.AddText("AutoCAD 2004", ptinsert, 5) objText.SetXData dataType, data Dim xdataOut As Variant Dim xtypeOut As Variant objText.GetXData "", xtypeOut, xdataOut MsgBox xtypeOut(0) MsgBox xdataOut(0) MsgBox xtypeOut(1) MsgBox xdataOut(1) End Sub |