API to exit Revit

API to exit Revit

Anonymous
Not applicable
1,056 Views
2 Replies
Message 1 of 3

API to exit Revit

Anonymous
Not applicable

I have implemented a revit plugin as an external application (IExternalApplication). 

After doing some processing, I want to automatically exit Revit. Is there a way to do that?

0 Likes
1,057 Views
2 Replies
Replies (2)
Message 2 of 3

augusto.goncalves
Alumni
Alumni

Hi,

 

You can try send Alt+F4 keys to Revit...have you tried that? It will depend on the context...

 

http://thebuildingcoder.typepad.com/blog/2010/11/launching-a-revit-command.html

 

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks!

I found a solution using Process.Kill()... not sure if there are any gotchas.

0 Likes