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:

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:


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.


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