BrowserOrganisation Change vent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I've create an addon which lists views to access some that I use regularly... I've now set it up to display as per the browser organisation for sheets - this all works well.
I need to update my list as the user chaqnges things so I've subscripbed to the DocumentChanged event with:
app.DocumentChanged += new EventHandler<Autodesk.Revit.DB.Events.DocumentChangedEventArgs>(onDocChanged);
I then check for changes to Views and BrowserOrganisation class using a filter:
//Create filter for elements of type View
ElementClassFilter viewFilter = new ElementClassFilter(typeof(View));
//Create filter for elements of type BrowserOrganisaton
ElementClassFilter orgFilter = new ElementClassFilter(typeof(BrowserOrganization));
//Views Modified Action
ICollection<ElementId> elesMod = e.GetModifiedElementIds(viewFilter);
//BrowserOrganisation Modified Action
ICollection<ElementId> orgMod = e.GetModifiedElementIds(orgFilter);
This works and I can detect when the user amends the BrowserOrganisation by changing some of its sorting.
My problem is that I cannot detect or work out what filter I should use to catch the event when the user sets the Browser organisation to something different.
The event fires, but the filters I have above miss whats changed. Anyone have any pointers on what to filter for to puck up the BrowserOrganisation change.
Thanks.