.NET

Reply
Active Member
tim.danner
Posts: 9
Registered: ‎08-17-2007
Message 1 of 3 (134 Views)

Opened DWG file closes the app instead of the DWG

134 Views, 2 Replies
03-25-2011 10:11 AM
Dim oleCollection As New ArrayList

If oleCollection.Count > 0 Then

            For Each OleDWGopen As String In oleCollection
                Dim dwgOpen As Document = DocumentManager.Open(OleDWGopen, False)
            Next
End If

 

I have code that opens a selected group of DWG files, binds any xrefs, searches for OLE objects and stores them in the oleCollection arraylist and then closes the drawings.  After all of the drawings are closed I reopen all of the DWG files in the arraylist and tell the end user to break the OLE links.  This part all works fine but when the end user closes the DWG it closes the whole AutoCAD application instead of just the drawing.  Any ideas why this would happen would be appreciated.  Thanks

*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 2 of 3 (130 Views)

Re: Opened DWG file closes the app instead of the DWG

03-25-2011 10:54 AM in reply to: tim.danner

My "Wild Guess" is there is something in the database that is corrupting the file and AutoCAD is crashing as a result. If you can widdle your code down to something that reproduced the issue, it would be easier to tell why.

 

---------------------------



(defun botsbuildbots() (botsbuildbots))
Active Member
tim.danner
Posts: 9
Registered: ‎08-17-2007
Message 3 of 3 (123 Views)

Re: Opened DWG file closes the app instead of the DWG

03-25-2011 12:01 PM in reply to: arcticad

I narrowed it down some.  The _olelinks command doesn't seem to work for us anymore.  I have tried in on AutoCAD MEP 2011 on Windows XP, 32 bit and Windows 7, 64 bit and both have the same result.

 

Thanks.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.