Hi all,
I am trying to scan each drawing and read certain blocks such as the sheet #, page title, etc. so I can put them into an excel sheet.
This is what I have so far...
Option Explicit
Private Sub ScanBlock()
Dim strString As String
Dim obj As Object
Dim obj2 As Object
'On Error Resume Next
For Each obj In ThisDrawing.PaperSpace
If obj.ObjectName = "AcDbBlockReference" Then
If obj.Name = "tbD2" Then
For Each obj2 In obj
If obj2.ObjectName = ?AcDbMtext? Then
strString = obj2.Value
MsgBox strString
'Return strString
End If
Next obj2
End If
End If
Next obj
End Sub
It breaks at the red section (?AcDbMtext?) saying "variable not defined"
Any ideas on why this is happening and how to fix it? I do have Mtext in the drawing. Please let me know if you need more info on this also.
Thanks for the help,
S_H