ProjectBrowser view type and ViewActivated event
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Folks,
Using the 2015 API...
Perhaps I'm thinking of this the wrong way but something here just doesn't seem consistent...
In my app, I've wired up to the UIApplication.ViewActivated event. I do this to understand when the user has changed views and/or documents.
What I've found though, is that if the user enters the project browser (or system browser) and takes some action, these "views" become my active view (as verified by checking Document.ActiveView.ViewType). But, I don't get any sort of callback into my ViewActivated event handler even though my active view has obviously changed from, lets say a ViewType.FloorPlan to ViewType.ProjectBrowser.
Are these windows really considered views in the same sense as the other ViewTypes? If so, why aren't they treated consistently in terms of triggering a ViewActivated event?
What led to this discovery is that I've found that if I call PromptForFamilyInstancePlacement while the ProjectBrowser is the active view, I get an internal revit exception from which recovery is 50/50 at best.
I could make better decisions in my application if I know ahead of time that the user is in specific types of views before they try to take some action.
Am I just looking at this the wrong way or am I missing something in its entirety here?
Its a bit confusing that there are view types of ProjectBrowser and SystemBrowser in the same enum that FloorPlan, CeilingPlan, Detail, and other such views. To me they are very different things.
Thanks much for any input!
-G