Message 1 of 1
Xref Reload, Hang AutoCAD

Not applicable
04-03-2010
08:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
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