Document.NewFootPrintRoof parameter problem

<pre xml:space=“preserve”><span class=“keyword”>I’m trying to create a roof on python, there is this function on Revit API for it:
public</span> FootPrintRoof <span class=“identifier”>NewFootPrintRoof</span>(
CurveArray <span class=“parameter”>footPrint</span>,
Level <span class=“parameter”>level</span>,
RoofType <span class=“parameter”>roofType</span>,
<span class=“keyword”>out</span> ModelCurveArray <span class=“parameter”>footPrintToModelCurvesMapping</span>
)

i use it on my python script: footprintRoof = doc.Create.NewFootPrintRoof(footprint, levelId, roof, footPrintToModelCurveMapping)
But i get this error:
<pre xml:space=“preserve”>Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “<string>”, line 95, in <module>
File “<string>”, line 83, in createRoof
TypeError: expected StrongBox[ModelCurveArray], got ModelCurveArray

The problem is that i need to pass a reference parameter ( Using prefix out on C# for example ) but i cant find a way to pass it on python, there is a solution for this?

I’m trying to create a roof on python, there is this function on Revit API for it:

public FootPrintRoof NewFootPrintRoof(
CurveArray footPrint,
Level level,
RoofType roofType,
out ModelCurveArray footPrintToModelCurvesMapping
)

use it on my python script: footprintRoof = doc.Create.NewFootPrintRoof(footprint, levelId, roof, footPrintToModelCurveMapping)
But i get this error:

TypeError: expected StrongBox[ModelCurveArray], got ModelCurveArray

The problem is that i need to pass a reference parameter ( Using prefix out on C# for example ) but i cant find a way to pass it on python, there is a solution for this?

 

I discovered to pass a StrongBox of ModelCurveArray on python you use like this :

footPrintToModelCurveMapping = clr.StrongBoxModelCurveArray

Hi Marcelo, Did this work for you? Can you create a roof this way. I’m not sure where to put the ‘clr.strongbox’ line, but im sure i tried all options and still no succes. Can you help me out a bit?

footPrintToModelCurveMapping = clr.StrongBox[ModelCurveArray](ModelCurveArray())