Hi,
How do I make this code faster?
dbxDoc = CType(AcadApp.GetInterfaceObject("ObjectDBX.AxDbDocument.17"), AxDbDocument)
dbxDoc.Open(dwgFile)
Dim ms As AcadEntity
For Each ms In dbxDoc.ModelSpace
If TypeOf ms Is AcadExternalReference Then
Dim intIndex As Integer = Array.IndexOf(Src, ms.Name.ToString.ToLower)
If intIndex >= 0 Then
tbl.Rows.Add(ms.Name, dwgFile, ms.Path)
ElseIf String.IsNullOrEmpty(txtXrefs.Text) Then
tbl.Rows.Add(ms.Name, dwgFile, ms.Path, "")
End If
End If
Next
For Each ms In dbxDoc.PaperSpace
If TypeOf ms Is AcadExternalReference Then
Dim intIndex As Integer = Array.IndexOf(Src, ms.Name.ToString.ToLower)
If intIndex >= 0 Then
tbl.Rows.Add(ms.Name, dwgFile, ms.Path)
ElseIf String.IsNullOrEmpty(txtXrefs.Text) Then
tbl.Rows.Add(ms.Name, dwgFile, ms.Path, "")
End If
End If
Next
This is to get all parent xrefs only from a drawing.
Thanks