IUpdater not responding to offset parameter changes in Revit 2016?
Not applicable
04-19-2016
12:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
so I have a updater that I want to trigger on changes to the offset parameter of familyinstances.
So I register it like this:
Snippet
RevitUpdater updater = new RevitUpdater(uiapp.ActiveAddInId); if(!UpdaterRegistry.IsUpdaterRegistered(updater.GetUpdaterId())) { UpdaterRegistry.RegisterUpdater(updater); if (!UpdaterRegistry.IsUpdaterEnabled(updater.GetUpdaterId())) UpdaterRegistry.EnableUpdater(updater.GetUpdaterId()); UpdaterRegistry.AddTrigger(updater.GetUpdaterId(),new ElementClassFilter(typeof(FamilyInstance)),Element.GetChangeTypeParameter(new ElementId((int)BuiltInParameter.INSTANCE_FREE_HOST_OFFSET_PARAM))); UpdaterRegistry.AddTrigger(updater.GetUpdaterId(),new ElementClassFilter(typeof(FamilyInstance)),Element.GetChangeTypeParameter(new ElementId((int)BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS))); }
I've added the comments parameter to just to make sure Im not doing anything wrong.
I kicks in just like expected when I change the instance comment, but the offset only kicks in when the user sets the value of the offset by entering a value in the properties.
If the user moves the element and the offset gets changed because of this, nothing happens. This cannot be excepted behaviour, right?
Do I have to add a trigger for element geometry changed?
Thanks!
Erik
Link copied