Message 1 of 34
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
Could someone help me with this? I would like to get all block with attributes in the opened drawing and to list the names of the blocks and their attribute's tags/values. So, firstly, I am trying to get the information about block names.
'AutoCAD app
Dim acadApp As AcadApplication
acadApp = GetObject(, "AutoCAD.Application")
'Active doc
Dim dbxDoc As Object
dbxDoc = acadApp.ActiveDocument
acadApp.Visible = True
Dim entity As Object
'Catch blocks from the opened dwg
For Each entity In dbxDoc.PaperSpace
If TypeOf entity Is AcadBlockReference Then
MsgBox(entity.GetType.Name)
End If
Next entity
End Sub
Using code from the above the form is loaded but I am not getting the response about the block's name.
I am using AutoCAD 2017 and VB2015.
Many thanks!
Inventor 2018/Windows 10 x64
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution. Kudos are also gladly accepted.
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution. Kudos are also gladly accepted.
Solved! Go to Solution.