
Revit’s XYZ is not a valid geometry object per comments in the migration post. They have some special methods to handle that conversion. Now, your input into the Python is a DS Point. Right? I wrote two definitions to make my life easier when dealing with revit to Dynamo and Dynamo to Revit points while always remembering that those two operate in different units too (Revit in Feet and Dynamo in Meters). Here they are:
def toRvtPoint(point):
x = Autodesk.Revit.DB.UnitUtils.Convert(point.X, DisplayUnitType.DUT_METERS, DisplayUnitType.DUT_DECIMAL_FEET)
y = Autodesk.Revit.DB.UnitUtils.Convert(point.Y, DisplayUnitType.DUT_METERS, DisplayUnitType.DUT_DECIMAL_FEET)
z = Autodesk.Revit.DB.UnitUtils.Convert(point.Z, DisplayUnitType.DUT_METERS, DisplayUnitType.DUT_DECIMAL_FEET)
return Autodesk.Revit.DB.XYZ(x,y,z)
def toDynPoint(point):
x = Autodesk.Revit.DB.UnitUtils.Convert(point.X, DisplayUnitType.DUT_DECIMAL_FEET, DisplayUnitType.DUT_METERS)
y = Autodesk.Revit.DB.UnitUtils.Convert(point.Y, DisplayUnitType.DUT_DECIMAL_FEET, DisplayUnitType.DUT_METERS)
z = Autodesk.Revit.DB.UnitUtils.Convert(point.Z, DisplayUnitType.DUT_DECIMAL_FEET, DisplayUnitType.DUT_METERS)
return Autodesk.DesignScript.Geometry.Point.ByCoordinates(x,y,z)