Element selection from dockable panel

Element selection from dockable panel

Anonymous
Not applicable
698 Views
3 Replies
Message 1 of 4

Element selection from dockable panel

Anonymous
Not applicable

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!

0 Likes
699 Views
3 Replies
Replies (3)
Message 2 of 4

Aaron.Lu
Autodesk
Autodesk
This should be a known issue, if you upgrade Revit, the problem might disappear


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 3 of 4

tsc444
Explorer
Explorer

I'm having the same exact issue. Could you please confirm if this is a known bug and if it has been fixed?

0 Likes
Message 4 of 4

tsc444
Explorer
Explorer

DId you ever find out what the problem was? I'm having the same exact issue and cannot come up with a solution in Revit 2016.

0 Likes