I would like the workset dialog to open when a workshared file is opened.
Is this possible?
Sorry for the rather late answer 🙂
I just discovered this post, and other information that I thought I would add here in case others happen to encounter it as well.
A read-only workset API was introduced in Revit 2012:
http://thebuildingcoder.typepad.com/blog/2011/11/read-only-workset-api.html
The full read-write workset API was introduced in Revit 2015 R2:
http://thebuildingcoder.typepad.com/blog/2015/02/revit-2015-r2-and-the-read-write-workset-api.html
You can use the WorksetTable.SetActiveWorksetId method to activate a workset:
http://www.revitapidocs.com/2018.1/9f11d796-ca5c-93d9-51e1-67cf8da9baf2.htm
For more details on exactly what you can and cannot achieve with worksets while opening a document, please refer to this discussion in the Revit API discussion forum:
I hope this helps.
Oh, and re-reading your question again, I also assume that you might be able to use PostCommand in the DocumentOpened event to launch the built-in Revit workset dialogue on opening a model.
Best regards,
Jeremy