Message 1 of 4
Problem displaying vlaues
Not applicable
06-04-2008
07:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to write a simple macro to display the property name and the value of the dynamic blocks in my drawing. If the dynamic block property is a single number, it works fine. However, if the property returns a point with value(0), (1) and (2), I can't get it to display. Below is the code.
Sub test()
Dim myEnt As AcadEntity
Dim MyBlkRef As AcadBlockReference
For Each myEnt In ThisDrawing.ModelSpace
Select Case myEnt.ObjectName
Case "AcDbBlockReference"
Set MyBlkRef = myEnt
If MyBlkRef.HasAttributes Then
atts = MyBlkRef.GetDynamicBlockProperties
Dim I As Long
For I = LBound(atts) To UBound(atts)
Dim eric1 As VbVarType
eric1 = vartype(atts(I).Value)
If eric1 = vbArray + vbDouble Then
MsgBox atts(I).PropertyName & " = " & atts(I).Value(0)
Else
MsgBox atts(I).PropertyName & " = " & atts(I).Value
End If
Next I
End If
End Select
Next
End Sub
Any Ideas? Message was edited by: conveyor1
Sub test()
Dim myEnt As AcadEntity
Dim MyBlkRef As AcadBlockReference
For Each myEnt In ThisDrawing.ModelSpace
Select Case myEnt.ObjectName
Case "AcDbBlockReference"
Set MyBlkRef = myEnt
If MyBlkRef.HasAttributes Then
atts = MyBlkRef.GetDynamicBlockProperties
Dim I As Long
For I = LBound(atts) To UBound(atts)
Dim eric1 As VbVarType
eric1 = vartype(atts(I).Value)
If eric1 = vbArray + vbDouble Then
MsgBox atts(I).PropertyName & " = " & atts(I).Value(0)
Else
MsgBox atts(I).PropertyName & " = " & atts(I).Value
End If
Next I
End If
End Select
Next
End Sub
Any Ideas? Message was edited by: conveyor1