VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UnloadArx with "empty" Autocad

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
170 Views, 2 Replies

UnloadArx with "empty" Autocad

I have to unload an ARX app. before to close Autocad ( otherwise I receive a fatal error).
No problem unloading when a drawing is open; the trouble is when no documents are opened. In that case, using

Public WithEvents ACADApp As AcadApplication
ACADApp.UnloadArx ("xxxx.arx")

I receive the following error "Failed to get the Document object".

So far, during the BeginQuit event, I trap the error, create a new doc, unload the ARX and close, but I was looking for a more clever solution.

Thanks
Sandro
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

"migliosa" wrote in message
news:f119977.-1@WebX.maYIadrTaRb...

> but I was looking for a more clever solution.

Try replacing the ARX with one that doesn't crash your system.

--
There are 10 kinds of people:
Those who understand binary and those who don't
http://www.acadx.com
Message 3 of 3
Anonymous
in reply to: Anonymous

or you could open a blank drawing, close the arx,
close the blank drawing then close acad


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
I
have to unload an ARX app. before to close Autocad ( otherwise I receive a
fatal error).
No problem unloading when a drawing is open; the trouble is
when no documents are opened. In that case, using

Public WithEvents ACADApp As AcadApplication
 ACADApp.UnloadArx
("xxxx.arx")

I receive the following error "Failed to get the Document object".

So far, during the BeginQuit event, I trap the error, create a new doc,
unload the ARX and close, but I was looking for a more clever solution.

Thanks
Sandro

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost