Polycurve from DWG file

I’ve imported a DWG file using BIMmorp’s CAD.CurvesfromCADLayers. The DWG files consists of polycurves yet when I import the DWG file, the curves are converted into flattened dynamo lines. If all DWG polycurves consisted of 4 lines, then I would have been able to simply create sublists of 4 and join these curves into polycurves. However many polycurves consists of more than just 4 lines. Is there a way to create joined polycurves based on DWG polycurve?


P.S. I also tried tracing the DWG curves using model lines in Revit and then importing them, but Models lines also come in as a flattened list and not grouped.

Have you tried Grouping the Curves?


I tried using that method, but i didn’t work. The list returns null.

@robertobatista I did a similar on the Graphical package, GroupCurves node.
It does work quite fast. A similar approach is used at the beginning of the video below to group lines from a dxf file as polygons.

1 Like

GroupCurves node worked. Thanks!!

great :slight_smile:

@robertobatista I suppose you’re using ver 2.
Please try the updated code for grouping curves with Design Script