Get coordinates of points from a polyline

Hello there

I am trying to retrieve the points coordinates composing a polyline. I know how to do it in dynamo for revit but it seems different for civil3d.
For the moment I am able to select all the polyline I want, but I can’t retrieve any geometry information from it. Any idea would be appreciated

Thanks in advance

@angelohbwang FYI

@GuillaumeQ have you tried using the Object.Geomtry node to get a PolyCurve from the polyline? After that you can get any points as you want.

Thanks for your help.
I can now have access to the first and end points coordinates (with property StartPoint / EndPoint). But I can’t find any property / method to get a full list of points in the Civil3D API. I find strange the fact that there isn’t any PolyCurve class.

Right, Civil 3D API doesn’t have PolyCurve class. Alternatively, you can fully use Dynamo Geometry nodes to achieve your goal. For example, here is a graph to get 11 points with equal distance. PolyCurve is a special Curve, so any Curve nodes can be used on it.

Thanks for the proposition but I need exactly the coordinates of the control points of each polyline. But with your idea of manipulate curve I can now retrieve every points by decomposing polycurve in curves.

1 Like

Nice solution.

However, I’m receiving this notification when converting an AutoCAD Polyline to Dynamo geometry:


I found out what was going wrong here, it seems I have some Polylines that have multiple vertices at the same coordinate by inconsistencies in the Polyline itself:

Anybody have an idea how to fix this using Dynamo?

I know I can use a Map/Civil 3D command called MAPCLEAN to erase short objects for this but am interested to know if someone can show if Dynamo could do it also?

This error also comes up when Polyline vertices are just very close to each other like 0.007 meters.