I'm having trouble creating a footprint roof using revit 2018 API. Basically, I'm calling this:
doc.Create.NewFootPrintRoof(ca, doc.GetElement(roofsInstances[0].LevelId), roofsInstances[0].RoofType)
And:
- "ca" is a valid Autodesk.Revit.DB.CurveArray object. It's a closed loop.
- "doc.GetElement(roofsInstances[0].LevelId)" is a valid Autodesk.Revit.DB.Level object
- And "roofsInstances[0].RoofType" is a valid Autodesk.Revit.DB.RoofType object
When I call it, it returns: Exception: Value cannot be null.
Any idea on what could be the issue? Thanks a lot!