下面是我的代码:出错是是不是因为在ObjectDBX中没有AcadBlockReference??
Sub test()
Dim objdbx As Object
Dim str_f As String
Dim mybl As AcadBlockReference
Dim mybb As AcadObject
If Left(Version, 2) = "15" Then
Set objdbx = CreateObject("ObjectDBX.AxDbDocument.1")
ElseIf Left(Version, 2) = "18" Then
Set objdbx = CreateObject("ObjectDBX.AxDbDocument.18")
End If
str_f = "c:\temp\test.dwg"
objdbx.Open str_f
Set myblock = objdbx.Blocks("工艺数据块")
Set mybl = myblock ‘从此开始出错
ww = myblock.GetAttributes ‘这一句的也就无法运行