Object.Geometry return's null for 3D polyline


I am not able to figureout why Object.geometry returns null for a perticular 3D polyline and works fine for other.

Is there another way to get polycurve of 3D polyline ?
3Dpolyline_Test.dwg (887.8 KB)

I’ve seen this happen when there are coincident points in the 3D polyline. For some reasons that I don’t understand, it is possible in AutoCAD to have two polyline vertices that are identical, and it is really hard to tell!

In this case, the upper line in your example (i.e. the one with the curve at the end) has duplicate vertices at vertex numbers 193 and 194, which you can confirm using “Current vertex” in the Properties window. If you remove either one of those vertices, then Dynamo creates the geometry representation properly.

Civil 3D Toolkit


@Paolo_Emilio_Serra1 does the node check for and/or ignore coincident points?

Correct, that is what I designed it for, just recently though I’ve found an issue on some datasets so I’ve used the Prune Duplicates functionality in Dynamo rather than my dictionary approach comparing point coordinates.
These operations are captured in the log file, here is a preview of what you will see in the new log file image

The second polyline has two overlapping vertices and one of them gets removed


Very nice! :+1:


i have tried that thing also before reaching the forum. i didn’t had any luck with that too.

I am using toolkit 1.1.12. Will update the toolkit and try again.

Thanks alot

that is referring to my comment with regards to the changes I made recently, chances are you will still be seeing this behavior in 1.1.14 but it is worth a try

Got it, i have to wait for 1.1.15 then…thanks alot for all the help.

@mzjensen Thanks alot for reply. yes this 3D polylines are generated from corridor featurelines and sometimes you wll see redundant vertices in featurelines with same elevations. This might be the reason for coincidental points in 3D polyline too.

Wow very nice!! I also have this problem in one of my scripts maybe this is the solution!!