How to get information if parameter value in revit has changed

How to get information if parameter value in revit has changed

Anonymous
Not applicable
995 Views
2 Replies
Message 1 of 3

How to get information if parameter value in revit has changed

Anonymous
Not applicable

Hi community,

 

is there a way to get information if parameter value in revit has changed?

Maybe with the ChangeType Class?

 

At the end i need a list in my C# program e.g. with ID´s of all the elements where any value in my opened document has been changed.

 

Thanks for help

 

greetings

 

Michael

 
0 Likes
996 Views
2 Replies
Replies (2)
Message 2 of 3

pmcmm1
Enthusiast
Enthusiast

Hello there,

 

I don't think there is a built-in function to do what you want. The only way to do what you want is to create a database of all the values you wanted to store, and then you could check which ones changed by comparing the new and old values.

 

To help you further it would be interesting to get a better overview of what you are trying to achieve.

 

Regards

0 Likes
Message 3 of 3

jeremytammik
Autodesk
Autodesk

There are two ways to be informed when an element has been modified: the DocumentChanged event and the Dynamic Model Updater framework, or DMU.  The former is simple and informs of the modification after it has completed. The latter is more complicated, informs you beforehand and enables you to react to it and add your own modification to the same transaction. Here is a comparison between the two:

 

https://thebuildingcoder.typepad.com/blog/2016/01/idling-dmu-documentchanged-and-need-for-regen.html

 

Here are articles covering everything else you need to know about DMU:

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.31

 

For your simple use, the DocumentChanged event sounds perfectly sufficient.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes