"Date Last Modified" or Timestamp for Elements in Revit

Hello all,

I’m trying to find a way to log when an element is modified in my Revit projects. To clarify: I would like to be able to extract a timestamp for all elements within a Revit project that tells me when the last time they were moved or modified in any way. If I can track the user that modified, that’s also a plus, but the primary goal is extracting the timestamp.

I’ve found several articles about how this can be done using Dynamic Update within the Revit API (see: https://boostyourbim.wordpress.com/2013/01/15/dynamic-model-update-to-warn-or-log-after-a-user-operation/), but since I lack knowledge of C#, I do not know how to alter or impliment the code to make it do what I want it to do. So I’m trying to circumvent this using Dynamo.

Is there a package that contains nodes that allow me to do this? If not, is there another way?

Any advice is greatly appreciated.

 

1 Like

Seriously, any help, even vague ideas that I can continue to pursue would be helpful. I’ve continued to investigate on my own… The best bet I can see is finding some sort of Python script to plug into a node…

 

Any thoughts? Are there any nodes out there that I’ve overlooked, or other possible ways of doing this?

bump.

bump… I apologize for the continued bumps, but I really need to find an answer to this, or at least another lead.

William-

I’m no API expert (or even Dynamo) but I do have a few thoughts on your question.

First, to do anything like what you are asking, you would need to have some Updaters running in the background, and as far as I know this is outside of Dynamo’s capability at this time. Remember, you are looking for something that is essentially “always on and monitoring”, and Dynamo is more of a “one and done” sort of tool that does something to Revit and is then finished.

Secondly, are you just trying to track if one or a handful of elements are modified, or are you trying to create a log of every time every element is modified by any user? I can see some potential value in the first proposition, but the second option (if you were able to implement it) might render the user experience unbearable due to a slowdown as Revit tried to continually use valuable resources to monitor and log the user activities. That said, Revit already does this and more in the journal files (look into journal file parsing…).

 

Ben,

That’s a good point. I don’t think it would slow the program down as much as anticipated - threads indicate that Dynamic Updates (or some such thing) is commonly used in the industry with Revit to perform similar functions. One post even recommends it for this specific function, but does not go into how to do it - they only allude to how it can be done via the Revit API/Dynamic Update/Extensible Storage.

I have two thoughts that may be feasible, but maybe not:

  1. Is it possible to have an automated dynamo script that would run when the model is sync’d that could generate a list of modified elements? \

  2. Is it possible to do journal parsing via dynamo?

 

Any thoughts are welcome. Thanks in advance!

I just spoke with my engineers and they clarified:

 

They would like a way to have an element automatically populate a date/time parameter whenever it is modified.

 

Perhaps a dynamo script with that was constantly running with both models left opened…

 

So the question then simply becomes - is there a way to extract if a date/time when an element is modified via a dedicated machine running the dynamo script that syncs every so often…

 

 

“Perhaps a dynamo script with that was constantly running with both models left opened…”

That’s exactly the kind of performance degradation i think you want to avoid. Working in Revit = modifying elements. So basically, after every worthwhile action you take in revit, you will have to wait a second or so while Dynamo “updates” the time/date stamp for the element (s) that changed due to your user action. In other words - for each transaction you do, you must then allow time for Dynamo to do one transaction that reflects your transaction.

I’m not saying it’s impossible (because I don’t know enough to say absolutely that it is), but is it practical to use Dynamo for this? Probably not. In order to do what you are asking - the majority of the Dynamo definition will likely end up as Python Script since the Updater stuff is not built into any node. At that point, why not just go all the way into Revit Macros and write a Python tool that is always running in the background that does exactly what you want and keep Dynamo out of it? The reason I think that this all may be impossible to do in Dynamo because use of the Updaters usually involves assigning each Updater a GUID through the Code Editor (SharpDevelop , Visual Studio, etc) and as far as I know this is not possible to do in the Python Script within Dynamo.

What you can do in dynamo is take a step back from the second-by-second change-tracking and compare yesterday’s model to today’s model. It would not tell you who did what, but it would enable you to know what changed on what day (and perhaps even keep a record of how the element changed - position, family type, etc). This would likely come close to the first request.

For the parsing of journal files - i’m sure this would be possible as they are simply text files. You’d just need to know what you were looking for (easier said than done).

Hello,

 

How about Dynamo reading the Journal files and extracting that data to CSV?

1 Like