# A mess when exporting polylines to DWG

**URL:** <https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731>\
**Category:** Rhino for Windows\
**Tags:** windows, bug\
**Created:** [December 6, 2022, 9:07pm UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731 "2022-12-06T21:07:43Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![piroshki](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piroshki/32/695728_2.png) [@piroshki](https://discourse.mcneel.com/u/piroshki)\
**Post date:** [December 6, 2022, 9:07pm UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/1 "2022-12-06T21:07:43Z")

</div>

Hi all -

This problem has been around for a while… Any chance it can be addressed? The issue is that if I try to export polylines from Rhino to DWG, they get corrupted.

Here is what I start with:

 ![bug_start_inRhino](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/f/b/ffb965eaa263bd0471299797c9bd33fd7f75c5b1.jpeg)

And here is what I end up with:

 ![bug_end_inAutoCAD](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/e/6/5e651b26fe516db5934b65b3bf4dd64d1174bcdc.jpeg)

My settings are plain vanilla. The only way this works is if I explode everything first, which is a pain, as I have to rebuild the polylines in Rhino.

Cheers,

Tom

---

<div class="post-metadata">

**Author:** ![Helvetosaur](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/helvetosaur/32/635974_2.png) [@Helvetosaur](https://discourse.mcneel.com/u/Helvetosaur)\
**Post date:** [December 6, 2022, 9:33pm UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/2 "2022-12-06T21:33:09Z")

</div>

Can you post the file? That doesn’t look like a typical polyline to me.

---

<div class="post-metadata">

**Author:** ![piroshki](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piroshki/32/695728_2.png) [@piroshki](https://discourse.mcneel.com/u/piroshki)\
**Post date:** [December 6, 2022, 9:58pm UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/3 "2022-12-06T21:58:18Z")

</div>

Sure thing - here it is.

[ForExport\_Forum.3dm](https://discourse.mcneel.com/uploads/short-url/gIpWItYjdCTaCBmNRSSSR139H9b.3dm) (1.7 MB)

And just in case:

 ![Screenshot 2022-12-06 16.57.31](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/b/a/8ba98246282a66eb893ec70408bbc272a17753b1.png)

And just so people understand how I got these curves: I did a section through my model, using the “Section” command.

Cheers

---

<div class="post-metadata">

**Author:** ![Helvetosaur](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/helvetosaur/32/635974_2.png) [@Helvetosaur](https://discourse.mcneel.com/u/Helvetosaur)\
**Post date:** [December 7, 2022, 9:19am UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/4 "2022-12-07T09:19:06Z")

</div>

The section you took through your 3D model resulted in various curves and polycurves - they are not polylines. When you export them, they are indeed turned into polylines due to your settings here:

![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/f/7/df75a6c5f6cc44332d5f07176125fdbe86643e0c.png)

If I export your curves with the same settings you have posted above, and then re-import them into Rhino, I get a very close approximation of your original - of course, all the smooth curves have been converted into segmented polylines, as per the export settings.

[ExportTest-07-12-22.3dm](https://discourse.mcneel.com/uploads/short-url/bRJboE2eTUG3VQBsnRBPiitpAOr.3dm) (4.6 MB)  
[test.dwg](https://discourse.mcneel.com/uploads/short-url/8Mr6XaNmrznaqmuzKLsR8etescR.dwg) (40.5 KB)

So the fault seems to be in AutoCAD’s import perhaps. I don’t know what version of ACAD you are using, but since you are exporting from a LEFT viewport in Rhino, this can confuse versions like LT which are strictly 2D.

I wonder if you can try the following:  
Use [RemapCPlane](https://docs.mcneel.com/rhino/7/help/en-us/index.htm#commands/remapcplane.htm?Highlight=remap) on your section curves, remap them from Left to Top. Then project the result to the Top CPlane. Then re-export the result. Does that work any better?

---

<div class="post-metadata">

**Author:** ![piroshki](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piroshki/32/695728_2.png) [@piroshki](https://discourse.mcneel.com/u/piroshki)\
**Post date:** [December 7, 2022, 3:07pm UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/6 "2022-12-07T15:07:37Z")

</div>

Hi Helvetosaur -

I appreciate you looking into this.

The main issue I have is that this used to work just fine and no longer does. I wish I could say when this started happening - from memory it was before version 7, but I can’t swear to that.

I don’t think that the viewport selection makes any difference, since the setting forces the curves to be projected onto the CPlane, and are exported as a 2D drawing. We’ve been doing this for a decade+, and that was never an issue.

And on my end, if I re-import the curves into Rhino, I get exactly the same result as in Autocad, which tells me this isn’t an Autocad issue, as much as that would have been satisfying…

Rhino is doing something to the curves on the way out.

There are the re-imported curves in Rhino:

 ![ViewCapture20221207_100443](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/7/7/777506e60d01bc9ed56f9b1865538d61241ff0df.jpeg)

PS: We use the latest version of Autocad LT (version 2023). We’ve been using LT for years, never been an issue with importing DWGs from Rhino until this issue.

---

<div class="post-metadata">

**Author:** ![Helvetosaur](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/helvetosaur/32/635974_2.png) [@Helvetosaur](https://discourse.mcneel.com/u/Helvetosaur)\
**Post date:** [December 7, 2022, 5:36pm UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/7 "2022-12-07T17:36:45Z")

</div>

> [@piroshki](#):
>
> And on my end, if I re-import the curves into Rhino, I get exactly the same result as in Autocad, which tells me this isn’t an Autocad issue, as much as that would have been satisfying…

Dunno, when I re-import the dwg I posted above - which was exported from your sample file in Rhino Rhino using your settings shown in the screenshot, I get this:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/1/4/014ca1a5192c71b769597a4a54c499171bb03f64.png)

Which looks correct to me and there doesn’t appear to be anything missing.

Interesting though, you are showing it in the XY plane and somewhere near the origin (you can see the grid and a point in your image) but the curves were not on the XY plane when exported, they were drawn in the “Left” ortho viewport.

---

<div class="post-metadata">

**Author:** ![piroshki](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piroshki/32/695728_2.png) [@piroshki](https://discourse.mcneel.com/u/piroshki)\
**Post date:** [December 7, 2022, 6:24pm UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/8 "2022-12-07T18:24:06Z")

</div>

How strange that we get different results when re-importing…

---

<div class="post-metadata">

**Author:** ![wim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/wim/32/747482_2.png) [@wim](https://discourse.mcneel.com/u/wim)\
**Post date:** [December 8, 2022, 9:51am UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/9 "2022-12-08T09:51:06Z")

</div>

Hi Tom -

> [@piroshki](#):
>
> How strange that we get different results when re-importing…

Are you importing Mitch’s DWG file?

At any rate:

> [@piroshki](#):
>
> My settings are plain vanilla.

> [@piroshki](#):
>
> ![Screenshot 2022-12-06 16.57.31](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/b/a/8ba98246282a66eb893ec70408bbc272a17753b1.png)

There is no “LDP\_Metric” export scheme in vanilla Rhino.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/5/5/a558518f7e195b7d00f5078129a434be52290bcf.png)

On my end, round-tripping a DWG that’s produced with the `Default` scheme worked fine.  
-wim

---

<div class="post-metadata">

**Author:** ![piroshki](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piroshki/32/695728_2.png) [@piroshki](https://discourse.mcneel.com/u/piroshki)\
**Post date:** [January 2, 2023, 5:38pm UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/10 "2023-01-02T17:38:48Z")

</div>

Sorry for the very late response to your helpful post.

I eventually marched through all the settings and found that the culprit was the “split curve at kinks” that messed everything up. If I unselect it, my exports work just fine. Smells like a bug to me…

Happy New Year, everyone!

T.

---

<div class="post-metadata">

**Author:** ![JoergH](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joergh/32/590938_2.png) [@JoergH](https://discourse.mcneel.com/u/JoergH)\
**Post date:** [January 2, 2023, 11:34pm UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/11 "2023-01-02T23:34:01Z")

</div>

See Bobis latest post:

> [@Export for cnc file](https://discourse.mcneel.com/t/export-for-cnc-file/152764/2):
>
> Rhino uses wrong default settings for exporting curves into DWG or DXF. That causes lots of problems, such like an unwanted loss of accuracy, overly-dense curve segments, and huge file size. The easy fix is to change those settings as shown below: It’s recommended to save that scheme so that you can use it every time instead of Rhino’s wrong default settings.

 ![grafik](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/0/9/a0902864f5f0a2074a07749969e2e83424544f51.png)

I fully agree with him … not so sure about exporting polylines as splines, but for the rest… don´t use tesselation or splitting at kinks…

---

<div class="post-metadata">

**Author:** ![Rhino\_Bulgaria](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rhino_bulgaria/32/505284_2.png) [@Rhino\_Bulgaria](https://discourse.mcneel.com/u/Rhino_Bulgaria)\
**Post date:** [January 3, 2023, 4:58am UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/12 "2023-01-03T04:58:47Z")

</div>

Exporting Polylines as Splines turned out to be the most appropriate way to all the CNC laser shops that used my DWG and DXF drawings over the years. Some of their software was unable to properly work with Polylines saved as Polylines, however, Splines worked 100% of the time.

---

<div class="post-metadata">

**Author:** ![luca4](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/luca4/32/769563_2.png) [@luca4](https://discourse.mcneel.com/u/luca4)\
**Post date:** [January 3, 2023, 6:39am UTC](https://discourse.mcneel.com/t/a-mess-when-exporting-polylines-to-dwg/151731/13 "2023-01-03T06:39:02Z")

</div>

Hi @piroshki ,  
did you tried CopyPasting from Rhino WIP to Autocad?  
I tested your file with BricsCAD V23.1.07 and look working fine.

I find copy paste to DWG a great new feature added in Rhino 8,  
please have a look here too  
[Copy/paste geometry between instances of Rhino and Autocad](https://discourse.mcneel.com/t/copy-paste-geometry-between-instances-of-rhino-and-autocad/107341)  
We love all Rhino but we have to deal with DWGs, this ease the pain!

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/a/7/aa7aa7f09b6c573db46a45a434e8abcf76a4cf12.png)
