请教:利用ObjectDBX取得块属性的方法
下面是我的代码:出错是是不是因为在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‘这一句的也就无法运行
Set mybl = myblock ‘类型不匹配 感谢红日前辈,问题得到完满的解决 谢谢分享。 进来看看感谢分享
页:
[1]