Hi
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
p.s.
for example
doc.GetElement(Autodesk.Revit.DB.ElementId) - get me Revit.Element but i need to get Autodesk.Revit.DB…
and
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.
Unwrapping
From Revit.Dynamo what does UnwrapElement() do exactly? :
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.
Select.ByElementId I believe is the name.