Okay so this is where the implementation is going:
- You can add
hooks/doc-updater.py
as a hook script that gets tied to and internal pyRevitIUpdater
handler - On every element change, pyRevit will run your hook and will pass the UpdaterData as arguments
Example
This hook script sets the wall heights to 5 on model changes
from pyrevit import EXEC_PARAMS
from pyrevit import revit, DB
doc = EXEC_PARAMS.event_args.GetDocument()
for wall in revit.query.get_elements_by_class(DB.Wall, doc=doc):
p = wall.LookupParameter("Unconnected Height")
p.Set(5)