PolylineExtensions.GetGeometry for 3DPolylines

Hello,

Is there a way to get the geometry of a 3DPolyline with the node PolylineExtensions.GetGeometry ? With another node?
@Paolo_Emilio_Serra1

@bertrand.savarit you can just use the Object.Geometry node.

Hello @mzjensen,

Actually that’s what i did but i don’t know why with the two nodes :
PolylineExtensions.GetGeometry and Object.Geometry
I still have some null results…


You’ll find attach the script, the main purpose is to get all Lines/Polylines/3Dpolylines that are included in a given layer of all my xrefs.
Layer_Geometrie_XREF.dyn (955.0 KB)

@bertrand.savarit The Civil 3D Toolkit node writes a log file and reports the steps it covers. Please, can you share it? it is in your temp folder it is called Autodesk_Civil3DToolkit.log

Here is the log file :
Autodesk_Civil3DToolkit.txt (397.6 KB)

@bertrand.savarit I can see the problem, I’ll show you how to read the log.
The Polyline conversion is a particularly tricky operation so I decided to make the toolkit pretty talkative about it, every polyline command starts like this:
PolylineExtensions.ByPolyCurve() Started...
The closing statement instead looks like this:
PolylineExtensions.ByPolyCurve() Completed

Anything in between is telling a story about what is happening. In case something goes wrong the closing statement will be missing and depending on which intermediate message of the “story” it stopped, I can trace back the error that caused it.
In your case there are 40 Polylines that threw an exception immediately before counting how many lines and arcs are inside the PolyCurve you used as input.
Can you please try the the node PolyCurve.Curves() on the same inputs and see what is the result?

I’m guessing the 3D polylines that return null have coincident points. You won’t see the warning because it is being swallowed up by the geometry scaling warning. Just as a test, you could try translating things closer to the origin first to see if you get the coincident points warning.

@Paolo_Emilio_Serra1 the Toolkit node only works for polylines, correct? It doesn’t work with 3D polylines?

@mzjensen It works for both, in fact the output is an Object because it could return two different types (Polyline and Polyline3D) or at least that was my intention :slight_smile:

v1.1.12

GetObject

@mzjensen I was talking about another node to create a Polyline.

I’m not sure where you want me to go through… the thing is for some of my Objects i cannot get the geometry, i don’t see where you want to switch with the polycurve.curve node as i want to get the polycurves of my autocad objects…

After running an OVERKILL on the source the issue disappeared.

I got the same result but it’s not a good news when you have more than 100 xrefs ! Would you think of any way to workaround it through Dynamo?

I agree, you can keep ignoring the null values, you can ask to cleanup the DWGs before using them, you can run the overkill on all the drawings in a folder via Python…

Via Python and Dynamo? i am a newbie in Dynamo i let you imagine my level in Python :smiley:

good, you can only get better at both :slight_smile:

1 Like

Civil3DToolkit 1.1.13 ? :slight_smile:

yes

:+1:t2:
Would you recommand to always use it at the beginning of any dynamo script?