从动态块查找表中提取自定义信息
有没有人这样做过?我在查找表中放置了一些零件编号,但似乎找不到它们在代码中的位置**** Hidden Message ***** 这是不是意味着你得不到信息?我可以看到该块被命名为U11,但是我没有看到任何与之相关联的自定义数据。
我找到了这个,但不知道如何让它工作
也许这将让你开始。
Private Sub Dy()
Dim oBref As IAcadBlockReference2
Dim oDynProp As AcadDynamicBlockReferenceProperty
Dim arr
Set oBref = EntSel
Debug.Print oBref.Name, oBref.EffectiveName
arr = oBref.GetDynamicBlockProperties
Dim i As Integer
For i = 0 To UBound(arr)
Set oDynProp = arr(i)
Debug.Print "PropertyName=" & oDynProp.PropertyName
If Not IsArray(oDynProp.Value) Then
Debug.Print oDynProp.Value
Else
Dim V As Variant
V = oDynProp.Value
Dim j As Long
For j = LBound(V) To UBound(V)
Debug.Print V(j)
Next j
End If
Next i
End Sub
页:
[1]