I want to know how to get attributes from Currently opened drawing using vb.net?
Dim blkobj As AcadBlockReference
Dim attributeName1 As String = String.Empty
Dim attributeValue1 As String = String.Empty
For Each obj As Object In blkobj.GetAttributes()
If attributeName1.ToUpper() = blkobj.EffectiveName.ToUpper() Then
'For reading AttributeValue
attributeValue1 = obj.TextString
'For Writing Attribute Value
obj.TextString = attributeValue1
I used the above code..Iam getting null reference error in FOR EACH..I am using autocad electrical...
Please send me a solution..How to get attributes?
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions to get help installing your software.
The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.