Xref Reload, Hang AutoCAD

Xref Reload, Hang AutoCAD

Anonymous
Not applicable
488 Views
0 Replies
Message 1 of 1

Xref Reload, Hang AutoCAD

Anonymous
Not applicable
Hi all
Please some one help me.

i am useing AutoCAD 2007 and VB6
I try to restore all setting of xref. so i try unload and reload.

it work for one or two times. but it does not work for many time. it give
error. -2145386481 "Null object ID"
What i did mistake and is there any solution of it?

{code}
Dim Ent As AcadBlock
Dim npt(0 To 2) As Double

For Each Ent In AcadDoc.Application.ActiveDocument.Blocks ' AcadDoc =
ThisDrawing

If Ent.IsXRef Then
path = Ent.path
xname = Ent.Name
Ent.Unload
Ent.AttachExternalReference path, xname, npt, 1, 1, 1, 0, True
Ent.Reload ' Error when this line run
End If

Next Ent

Thanks
Amrit
0 Likes
489 Views
0 Replies
Replies (0)