public static void UpdaterOff(AddInId activeAddInId, ref CopingDistanceUpdater updater) { if (UpdaterRegistry.IsUpdaterRegistered(updater.GetUpdaterId())) { UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId()); } }
public static void UpdaterOn(AddInId activeAddInId, ref CopingDistanceUpdater updater) { if (!UpdaterRegistry.IsUpdaterRegistered(updater.GetUpdaterId())) { UpdaterRegistry.RegisterUpdater(updater, true); ElementCategoryFilter filter = new ElementCategoryFilter(BuiltInCategory.OST_StructuralFraming); UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), filter, Element.GetChangeTypeGeometry()); } }