RIR Python - 'CurveLoop' object has no attribute 'ToCurve'

Hi,

I am getting the following error when converting a DB.Curveloop to Rhino Polycurve:

  1. Solution exception:‘CurveLoop’ object has no attribute ‘ToCurve’

I checked the Geometry Decoder and in there, ToCurve is the method to convert a CurveLoop to a PolyCurve.

For more clarity, I am trying to get Crop View Curves and get their Rhino equivalent.

Any idea why I am getting this error?

Hi @mucahitbgoker,

Do you have these lines on your script?

import RhinoInside
clr.ImportExtensions(RhinoInside.Revit.Convert.Geometry)

Rookie mistake :man_facepalming:! Works like a charm :tada::tada:.