新手求助,使用下述代码,能判断对象是否为动态块,为什么不能取得属性数组?
 - Sub test()
- Dim objBlkDef As AcadBlock
- For Each objBlkDef In ThisDrawing.Blocks
- If objBlkDef.IsDynamicBlock Then
- If objBlkDef.Name = "2458339.445652801" Then
- Dim dybProp As Variant
- dybProp = objBlkDef.GetDynamicBlockProperties
- For i = LBound(dybProp) To UBound(dybProp)
- If dybProp(i).PropertyName = "距离" Then
- dybProp(i).Value = 500#
- Exit For
- End If
- Next i
- End If
- End If
- Next
- End Sub
|