Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66694

Re: Get changes in IUpdater

$
0
0

Hi Michal,

There probably is, but the overhead would likely be prohibitive.

Consider a transactional approach like the one in Jeremy Tammik's blog:

http://thebuildingcoder.typepad.com/blog/2016/01/tracking-element-modification.html

 

You could always combine the two approaches, and upon opening the model export each element's 'state' (both as data and as hashes of that data). Getting the data would have to be in the current thread, but writing the data (as strings etc, not Revit elements) could be done on a different thread.

When you get the modified elements via your updater, recreate the data again and compare the hashes. If the hashes differ, then do a diff on the actual data.

You could create different data buckets (parameters, geometry, etc) for each element so upon checking ChangeType, you could check just the data bucket (and hash) appropriate to the change.

Depending on your requirements, you could compare the data and hash on a different thread also and re-gather the results when needed (or wait for them to complete).

 

Worksharing, BIM360, Revit Server etc would all make this a wee bit more complicated (and perhaps slower), so an approach would have to be well thought out before commencing.

 

Cheers,

 

Matt


Viewing all articles
Browse latest Browse all 66694

Trending Articles