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: 

Cancel the onQuit event

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
bsee1
596 Views, 3 Replies

Cancel the onQuit event

I have a handler for Inventor's onQuit event.  In certain circumstances I'd like to stop Inventor from quitting.  Is to do this?  I don't see it in the documentation.

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
3 REPLIES 3
Message 2 of 4
FarrenYoung
in reply to: bsee1

I tried this before and Inventor ignored my attempt at canceling the event the same way I can cancel other events.
I looked in the help file and found out that it is documented that the event is ignored.
"HandlingCode Output that indicates how you are handling the event. The value of this argument is currently ignored for this event. "
It would be nice if they would handle this as I've needed to do it on more than one project.
--Farren

************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************
Message 3 of 4
bsee1
in reply to: FarrenYoung

That's what I thought the documentation was saying too.  Very inconvenient.  Thank you, you saved me from a lot of hassle.

 

Autodesk, any chance you can come up with a way to cancel the close process?  Yes, I'll put it in IdeaStation so it can be added to inventor 4 versions from now.

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
Message 4 of 4
philippe.leefsma
in reply to: bsee1

Hi

 

Unfortunately there doesn't to be a direct to achieve this through the existing API. One suggestion you may want to try could be to use a similar approach to the one mentioned in the following blog post, that is to catch WM_CLOSE message by your custom code. This approach would be however unsupported because it doesn't involve directly an Autodesk specific API, so you would need to dig it out on your own. Sorry for not being more helpful at the moment:

 

http://adndevblog.typepad.com/autocad/2012/12/vetoing-quit-in-autocad.html

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Autodesk Design & Make Report