Convert Element to Revit.Elements.Element


I previously asked a more complex question on this subject here : Converting from Revit.DB.Element to Revit.Elements.Element

I am aware that you can convert a Revit.Elements.Element x to a Revit.DB.Element by using x.InternalElement. However, I can’t find a way to convert from Revit.DB.Element to Revit.Elements.Element. Is there something I am missing?

  • Jed

Actually I ended up finding this one. For a given Revit.DB.Element x, use this code:

Revit.Elements.Element converted = Revit.Elements.ElementWrapper.ToDSType(x, true);

it shows me that error when i used that function. what else should i do?