AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Attributes

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
186 Views, 0 Replies

Attributes

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

        Try
            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
                End If
            Next
            blkobj.Update()
        Catch
        End Try

 

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?

Tags (1)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost