.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extracting block Attributes

1 REPLY 1
Reply
Message 1 of 2
muthineni
284 Views, 1 Reply

Extracting block Attributes

I need to open a drawing and read block attributes in each layout.

 

 

 Dim AcadApp As AcadApplication
        Dim AcadDoc As AcadDocument

 Try
            AcadApp = GetObject(, "AutoCAD.Application")
        Catch ex As Exception
            AcadApp = CreateObject("AutoCAD.Application")

        End Try
        AcadApp.Visible = True
        Try
            AcadDoc = AcadApp.Documents.Open(DWGName, True)
            Me.Refresh()

        Catch ex As Exception
            Me.Refresh()
            Exit Function
        End Try

 

  Dim Obj As Object

 

 For Each Obj In AcadDoc.Layouts

'-----------------Till here i was able to do.-------------------------

next

 

can anyone help me on how to read each layout block attributes?

1 REPLY 1
Message 2 of 2
Alfred.NESWADBA
in reply to: muthineni

Hi,

 

>> how to read each layout block attributes?

a layout can have multiple blockreferences! So if you like to get all titleblocks I would preferre to create a selectionset using the blockname of your titleblocks and go through that selectionset.

 

Look to >>>this blog<<< for selectionsets by blockname

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost