Track Override Graphics in View > By Element via Events
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have and IExternalDBApplication that tracks a few key metrics across an office (like sync times, loading families etc).
I would like to track when element graphics are overridden in a view. I can't work out how - or if it's possible. I would like the element that has been changed, and the view.
Currently I can just get the view, subscribing to the DocumentChanged Event - and I think my method may be crude?
public static void GetChangeType(Autodesk.Revit.DB.Events.DocumentChangedEventArgs e)
{
IList<string> trans = e.GetTransactionNames();
if (trans[0] == "View Specific Element Graphics")
{
ElementGraphics.Overridden(e); //report the view name and number
}
}
When the Event fires overriding the graphics of an element in a view, the only thing in DocumentChangedEventArgs is the view.
Ideally, I'd get the element(s) so I could get the OverrideGraphicSettings object.
An option: get all elements and their OverrideGraphicSettings on a ViewActivated Event. Wait for the above transaction then get the OverrideGraphicSettings and compare?! This seems overly complicated and heavy.
Am I missing an efficient way to do this, or is it possibly a problem not worth the effort?