How to check if Civil3D PolyCurve has self intersection?

Hello everyone,

I have a script which errors on Civil3D PolyLines (PolyCurves in Dynamo) when they are self intersecting.
Is there a way to only filter out these PolyLines and then explode them? (Geometry.Explode on each line would create other errors so a filter before that would be neccessary).

I couldn’t find a node to check this property and i dont have the Python/ API knowledge to find out.

Thanks in advance!

PS: I also provided a Civil3D File with a selfintersecting PolyLine and a sample Dynamo file.

ErrorMessage.dyn (7.0 KB)
Selfintersecting PolyLine.dwg (886.2 KB)