也许这会让你开始
- 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
|