Message 1 of 3
I need to extract a single attribute.
Not applicable
09-11-2003
05:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am fairly new in the VBA programming. I am trying to extract a single attribute and the program I have extracts all the attributes in my drawing. Here is the code can someone point me in the right direction.
Private Sub CommandButton1_Click()
Dim ACADObject As AcadEntity
Dim element As Object
Dim ArrayAttributes As Variant
Dim TagString As String
TagString = "BR_ST#"
Dim I As Integer
For Each element In ThisDrawing.ModelSpace
If element.EntityType = 7 Then
ArrayAttributes = element.GetAttributes
For I = LBound(ArrayAttributes) To UBound(ArrayAttributes)
MsgBox "Attribute Text String : " & ArrayAttributes(I).TextString
UserForm1.Hide
Next
End If
Next
End Sub
The attributetag "BR_ST" is the attribute I want to isolate, it is the first one that lists in the message box's. You can email me direct at [email protected]
Thanks
Private Sub CommandButton1_Click()
Dim ACADObject As AcadEntity
Dim element As Object
Dim ArrayAttributes As Variant
Dim TagString As String
TagString = "BR_ST#"
Dim I As Integer
For Each element In ThisDrawing.ModelSpace
If element.EntityType = 7 Then
ArrayAttributes = element.GetAttributes
For I = LBound(ArrayAttributes) To UBound(ArrayAttributes)
MsgBox "Attribute Text String : " & ArrayAttributes(I).TextString
UserForm1.Hide
Next
End If
Next
End Sub
The attributetag "BR_ST" is the attribute I want to isolate, it is the first one that lists in the message box's. You can email me direct at [email protected]
Thanks