Hi everyone, i have issue with making the floor with slope. As we know has a node called Floor.ByOutlineTypeAndLevel ,but this node can not make slope for floor. So i make a python code with method : NewSlab
The NewSlab method provides only one overload taking the following arguments:
-
CurveArray profile
-
Level level
-
Line slopedArrow
-
double slope
-
bool isStructural
The problem is varies
CurveArray has error when i input data in python code by
PolyCurve but it's success when i use it for
Floor.ByOutlineTypeAndLevel node.
You can see following picture:

So What the type of 1st arrgument in method NewSlab ???
Anyone has idea ???
A Polycurve.ByJoinedCurves is not the same as a Revit CurveArray. Inside the Floor.ByOutlineTypeAndLevel, there is code that takes the Polycurve and creates a new Revit CurveArray, then appends each curve into that new CurveArray. You will need similar handling in your Python code for this to work.
/// <summary>
/// Create a Revit Floor given it’s curve outline and Level
/// </summary>
/// <param name=“outline”></param>
/// <param name=“floorType”></param>
/// <param name=“level”></param>
/// <returns>The floor</returns>
public static Floor ByOutlineTypeAndLevel(PolyCurve outline, FloorType floorType, Level level)
{
…
var ca = new CurveArray();
outline.Curves().ForEach(x => ca.Append(x.ToRevitType())); // You will need the equivalent handling in Python, for each curve in the Polycurve, add to the CurveArray.
return new Floor(ca, floorType.InternalFloorType, level.InternalLevel );
}
Thanks Matt Jezyk , i’m understand now !! Have a nice day.