Hi everyone, I am tryng to find a way to find the date of creation of an element. Looking in the pyrevit guide, I found a useful basic tool (https://www.notion.so/Get-Revit-Model-Information-673e586c7f7d408898f07114ae4357c1) that allows you to get generic information about an element. Is it possible to include the creation date among these? Thanks in advise for your consideration
I have looked into this before. Revit elements do not have a timestamp property.
Creating a timestamp parameter for elements of interest that is updated when the model opens is one option to give an estimate of when the element was created.
Thank you Steve. Can I ask you if you have an example of a script that is able to do the trick you are describing?
through a hook (doc-opened)
writing data upon doc-opened event in elements of interest only if no data is in that specific parameter, that would do the trick for a basic element creation date tracking _ that would give you a day or so window
you could use the doc-changed but that might be overwhelming for revit.
there are lots of tools around to take snapshots of models (CTC has one, there is one in dynamo as well, …)
another approach, maybe my favourite as I believe ones needs to be lazy (or creative, depends on the point of view) is the model comparison tool in B360 to visulaze modified and new elements between published versions
a related discussion
from Autodesk.Revit.DB import( FilteredElementCollector, BuiltInCategory ) from rpw import revit, db from datetime import date doc = revit.doc mech_equipment = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_MechanicalEquipment).WhereElementIsNotElementType().ToElements() with db.Transaction(doc=doc, name="Update Time Stamp"): for m in mech_equipment: timestamp = m.LookupParameter('Time Stamp') if not timestamp.AsString(): timestamp.Set(str(date.today()))
Why not add it to the “who did that” button?