Issues with the creation of spaces boundaries

Hello the world,

I’m trying to create Spaces Boundaries within a Python script with the help of the API class here: https://www.revitapidocs.com/2020/e95433bf-3440-50e3-c9d0-c5559fbb0aff.htm

But when I want to input my curves in my script I got the message “expected CurveArrey, got Curve”:

My script here:

I use room boundaries from existing rooms that I converted before into curves, that’s IN[0]

IN[1] is just a XY plane

IN[2] is my view

IN[3] is the lenght of my list of curves

I tried with polycurve but it’s not working

I don’t know how to convert Curves into CurvesArrey.

I’m on Revit 2020, Dynamo 2.3.0

Thanks for help

Sorry for double posting but I’m new so I can’t put more than one image

Here’s my full script:

@vlacroixW5CSM

Could you pin the output of nodes? Given curves are converted to Revit types, you can simply create an instance of CurveArray then Append or Insert curves to the array.

Append
https://www.revitapidocs.com/2020/8a9eabb9-9d6a-9c11-e4d2-c5a7d7f49168.htm
Insert
https://www.revitapidocs.com/2020/2e0e43f1-b22f-8338-e965-adc8a2d5d55d.htm

NewSpaceBoundaryLines is expecting a collection of curves (CurveArray), not a stand alone curve.

Thanks jshial, I found yesterday a solution to my problem, I didn’t know you an create a CurveArray by simply say for example:

ca = CurveArray()

Here’s a picture of my script for whom want it:

And here’s all my script dynamo:

Do you know a method to make this on multiple view ?

Nevermind, whatever the view you choose it’ll work, it just need a 2D view in the document.

So you can replace in my dynamo script the node Select Model Elements by the nodes All element of Category and Categories (with room selected) and that’s good