Error When Running Dynamo Graph to Sum Polyline Areas

Hi,

I have a simple script that the user selects polylines and the total area of all selected polylines are added together to get a quick summation. I ran this graph on a recent project for some curb and gutter polylines and received the following error about points being coincident. I understand what that means and I am able to select some of the individual polylines to see which polylines are problematic, but I guess I don’t understand exactly why certain lines are problematic. If someone has time to take a look at the attached DWG and dynamo graph and let me know your thoughts that would be great. Thanks.

CHECK.dwg (934.3 KB)

JJH_PolylineAreas.dyn (11.7 KB)

Hi @hestingjj ,

I’ve had the same exact problem before! This means that you have one or multiple polylines which have points really close to eachother in Civil3D, which Dynamo can’t handle properly.

For me using the node PolylineExtensions.GetGeometry from the Civil3DToolkit package worked wonders!

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

Can you post what a solution to my issue would look like using the PolylineExtensions.GetGeometry node? I am not as familiar with that node.

I get the same error message when I set up the graph using PolylineExtensions.GetGeometry. @Daan
does the way I set up the graph to use your suggestion look correct? @david_licona can you show me how I would run the overkill command for the selected polylines before adding the areas to get the program to run?

There is also an Overkill node in the Civil 3D Toolkit.

Try

3 Likes

This is a better way to do it. Thanks!