Whether there is an analogue of Selection.Selection.Elements in Revit 2016?


#1

in Revit 2015 - uidoc.Selection.Elements - is work

but in Revit 2016 removed several methods

whether there is an analogue of this method in Revit 2016?


#2

The method was made obsolete. You’ll need to use uidoc.Selection.GetElementIds() and then convert those ids to elements.


#3

Dimitar thanks.
But unfair that someone decides for us, it has obsolete or not …


#4

if I understand correctly, this method gets the IDs of elements.
how to do a reverse process, Ids elements highlight them in Revit?


#5

Document.GetElement(id) would do the trick to retrieve the element, if you want to highlight something you should pass a list of ElementId to the UIDocument.Selection.SetElementIds(ids)

You should start to read the help on line :slight_smile:

 

http://help.autodesk.com/view/RVT/2016/ENU/?guid=GUID-541141C8-F390-424E-88BD-54F667C823F8


#6

Paolo, thank you