Autodesk.Revit.DB.IUpdater.Execute , know modification

Autodesk.Revit.DB.IUpdater.Execute , know modification

sizy458
Advocate Advocate
439 Views
3 Replies
Message 1 of 4

Autodesk.Revit.DB.IUpdater.Execute , know modification

sizy458
Advocate
Advocate

Hello,

this class work , on method Execute has called when element is modified,created,deleted. OK

I know the ID element  (GetAddedElementIds,GetModifiedElementIds,GetDeletedElementIds), OK

But how do i do for know if a geometry modified or parameter modified or type modified ?

I work track all change on the one reactor.

 

Thank.

0 Likes
440 Views
3 Replies
Replies (3)
Message 2 of 4

RPTHOMAS108
Mentor
Mentor

From Execute method compare UpdaterData.IsChangeTriggered against Element.GetChangeTypeGeometry etc.

 

I guess you can use ChangeType.IsIdentical or ChangeType.Contains for that comparison.

0 Likes
Message 3 of 4

sizy458
Advocate
Advocate
I want to do track only change all parameter.
There is the method : GetChangeTypeParameter but i want to do for all parameters.
How i do ?
0 Likes
Message 4 of 4

RPTHOMAS108
Mentor
Mentor

Not that I know of, you can only add that trigger for specific parameters.

 

Probably the best workflow for that would be to set up the updater for that specific parameter trigger not find out afterwards what triggered it. Two distinct execute methods for two distinct parameter changes, from that point onwards same underlying code logic. You can add multiple parameter triggers but can only respond to their current values i.e. you would have an idea which parameters you are monitoring so know which ones to review.

 

If you've used ChangeTypeAny to monitor all changes of parameters then the updater data method noted previously will likely only report that change type.

 

In the end updaters should be very finite in their scope, otherwise they get into a mess of self triggering. Seems awkward but it is awkward for a reason i.e. to get the developer to properly scope what changes they are monitoring.

 

What would be the aim in needing to know what parameter changed out of the ones you are monitoring? You respond to the whole picture don't you?

0 Likes