Sub Example_OwnerID() ' This example creates an MText object in model space ' and then finds the OwnerID for the object. Dim MTextObj As AcadMText Dim corner(0 To 2) As Double Dim width As Double Dim text As String corner(0) = 0#: corner(1) = 10#: corner(2) = 0# width = 10 text = "This is the text string for the MText object" ' Creates the MText object Set MTextObj = ThisDrawing.ModelSpace.AddMText(corner, width, text) ZoomAll MsgBox "The OwnerID for the MText object is: " & MTextObj.OwnerID End Sub
报错内容是:函数或接口标记为限制的,或函数使用了Visual basic中不支持的自动类型
顺便请教一下,cad2010的VBA编译器是否由中文版的?或者有中文包?