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?
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 -