Autodesk.Revit.DB.ElementId to Autodesk.Revit.DB.Element


I have Autodesk.Revit.DB.ElementId - its Id of the parameter

Are the exist way to convert

Autodesk.Revit.DB.ElementId to Autodesk.Revit.DB.Element


for example

doc.GetElement(Autodesk.Revit.DB.ElementId) - get me Revit.Element but i need to get Autodesk.Revit.DB…


doc.GetElement(Autodesk.Revit.DB.ElementId).ToRevitType() - not work too

I believe the “ToRevitType() and ToProtoType()” calls are for geometry conversion. Have you tried UnwrapElement(doc.GetElement(Autodesk.Revit.DB.ElementId))? I’m not certain that will solve your problem.


From :

Wrapped Elements are located in the Revit.Elements namespace. All wrapped Elements extend the Revit.Elements.Element abstract class. This class provides a public property InternalElementwhich contains a reference to the underlying RevitAPI Element, of type Autodesk.Revit.DB.Element. Alternatively, Dynamo provides a convenience function UnwrapElement(element) function that accepts wrapped Elements or arbitrarily nested lists of wrapped Elements. If passed a non-Element it will simply return the object unmodified.

1 Like

Archilab has a node for this. Check the code in that package for info.

Its a good news :slightly_smiling_face:

but i cant find it…

Select.ByElementId I believe is the name.