Difference if change element selection using External command vs External event
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am using Revit2014 UR3 and implemented addin to change element selection. When I run following codes in an event handler, element selection is updated in Revit view, but properties palette is not refreshed to show the selected element; If run same codes in external command, properties palette will be updated to show selected element.
Autodesk.Revit.UI.Selection.SelElementSet elementSet = uiDoc.Selection.Elements;
elementSet.Clear();
elementSet.Insert(elem);
uiDoc.Selection.Elements = elementSet;
// Places the element in the center of screen by moving the view
uiDoc.ShowElements(elementSet);
What is the difference between external command and external event for such use case? I prefer to use event handler becuase if use external command, there is more things need be done, like how to hide the command from user, and if hide the command, PostCommand will not work as expected.
Is this a known problem of Revit2014?