An interface named IUpdater is another DMU(Dynamic Model Update) methode. It is more flexible then Event Hadler, because we are more free is difining an event triger. The good thing is that we can trigger IUpdater when we make any element modification either by creating a new element or by modifying an existing geometry. Download a sample code from my GitHub page.
Read the previous article about Event Handlers where i explained how the __selfinit__ and togglestate functions work. The plan is to create an instance of the IUpdater class, register the updater, and set its triger.
First we need all neccessary imports. here they are:
# -*- coding: UTF-8 -*-
from pyrevit import framework
from pyrevit import script
from pyrevit.framework import AppDomain
from Autodesk.Revit.UI import *
from Autodesk.Revit.DB import *
from System import Guid
This is a standart body of the IUpdater class… read more