Running revit from a windows service?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Im building a web service that starts and runs revit using Process.Start(). However since the normal way of hosting a web service is in IIS or as Windows service, the started window is run in session 0 (using windows 10) so I cant see the window. I dont really mind this if it wasnt for the fact that when I open Revit files using the OpenAndActivate-method revit comes to a halt during the open process. It works if I use OpenDocumentFile, but that hides geometry when exporting. .
Im watching the DialogShowing event and Im dissmissing the windows where you set the open worksets and then it stops.
If I run my web service as a normal console app, it works.
So, has anyone come across this and has any idea on a solution or how to investigate further?
Running a web service as a console app definitely not ideal.
Thanks
Erik