Message 1 of 4
Element selection from dockable panel

Not applicable
01-18-2016
12:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi!
I trying to write plugin into Revit. I need highlight model from my dockable panel. I created two buttons, on this panel, one of them selects all walls and the other - all floors. I am using next code for this selection.
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { UIDocument uiDoc = commandData.Application.ActiveUIDocument; uiDoc.Selection.SetElementIds(Manager.GetAllElements()); return Result.Succeeded; }
When I press button and return focus to Revit it works fine.
But there are some strange behavior in Revit. If I choose walls at start, then choose floors, return to Revit I will see that floors will be selected there. It`s ok. When I deselect all elements in Model-view (3D-view), than click on dockable panel and go back to Revit, it will select walls (elements which was chosen in the penultimate step).
I use Revit Architecture 2016 .
Have you any idea why it happens?
Thank you!