public static Result OnShutdown(UIControlledApplication app) { LineStyleNetworkUpdater updater = new LineStyleNetworkUpdater(app.ActiveAddInId); UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId()); return(Result.Succeeded); }
public static void RegisterUpdater(AddInId id) { LineStyleNetworkUpdater updater = new LineStyleNetworkUpdater(id); UpdaterRegistry.RegisterUpdater(updater, true); //ElementId pid = new ElementId(BuiltInParameter.CLINE_SUBCATEGORY); ElementId pid = new ElementId(BuiltInParameter.FAMILY_ELEM_SUBCATEGORY); UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), new ElementClassFilter(typeof(CurveElement)), Element.GetChangeTypeParameter(pid)); }