Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic - Error closing active documents

3 REPLIES 3
Reply
Message 1 of 4
steveadd
2712 Views, 3 Replies

iLogic - Error closing active documents

I am using iLOgic on Inv 2012 to try and close the active document using the following piece of code -

 

 

InventorVb.Application.activedocument.Close (True)


 

This close the document but brings up the following Error msg...

 

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

 

Has anyone got a better piece of code that shuts down the active document but doesn't return the error? (I only want to shut down one document, not the application)

 

Look forward to any help you can offer.

 

Steve

3 REPLIES 3
Message 2 of 4
e.wiggers
in reply to: steveadd

Hello,

 

I am using the following code and it works fine:

 

ThisApplication.ActiveDocument.Close(True)

 

Eelco

Message 3 of 4
steveadd
in reply to: e.wiggers

thanks eelco,

The same issue still occurs. Maybe it has something to do with some of the other code im using.  The basic premise is that i have a message box that if answered yes leaves the current document open, but if no, it closes the current document and opens a different one.  The code does i as I want, other than this error.

 

Steve

Message 4 of 4
e.wiggers
in reply to: steveadd

Hi,

 

I don't know how the rest of your code looks like but maybe you trying to close the document from wich you fired the rule from. I believe that is not possible.

 

Eelco

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

Post to forums  

Autodesk Design & Make Report