Error When Running Dynamo Graph to Sum Polyline Areas

Another thing that worked for me sometimes to solve this was running the overkill command in the drawing. You can even add this to your routine through some python, a good example here : How to use civil 3D commands in a Python Script? - #3 by mzjensen

But try what @Daan suggested, you can then get the length of your polycurve quite easily. I haven’t gotten problems with the node on the C3D toolkit