# Extracting CAD Layers

**URL:** <https://forum.dynamobim.com/t/extracting-cad-layers/20498>\
**Category:** Uncategorized\
**Created:** [March 27, 2018, 5:29pm UTC](https://forum.dynamobim.com/t/extracting-cad-layers/20498 "2018-03-27T17:29:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenjaminDoty](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@BenjaminDoty](https://forum.dynamobim.com/u/BenjaminDoty)\
**Post date:** [March 27, 2018, 5:29pm UTC](https://forum.dynamobim.com/t/extracting-cad-layers/20498/1 "2018-03-27T17:29:53Z")

</div>

I am trying to extract curves from an AutoCAD file but am running into an issue with Empty Lists. I have an example of a Linked and Imported CAD file in my Revit document. I am trying to pull a single CAD layer (J-Floor) which I can see in Revit, `CAD.LayerNames` shows it, but it does not show in `CAD.LayerNamesInUse` nor can I exctract the curves via `CAD.CurvesFromCADLayers`

 ![2018-03-27_10-18-32](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/2/d21e44124d5753287d3c966ab27391ac778b8ada.jpg)

I seem to remember reading somewhere that there is an issue with 3D lines?

I have reviewed the following links but with no success.

> [@Curves From Cad layers](https://forum.dynamobim.com/t/curves-from-cad-layers/15433/8):
>
> It works fine:

> [@Drive floor objects from CAD using Bimorph package](https://forum.dynamobim.com/t/drive-floor-objects-from-cad-using-bimorph-package/20191/6):
>
> Hi Thomas, kindly find the attached autocad files and the screen shots for both cases (Single and multiple floors). i tried what your suggested me and still not working . the problem is more than one poly line it is not working. Thanks for help.[Convert CAD Outlines to Floor Slabs(For Chadrashekhar).dyn](https://forum.dynamobim.com/uploads/short-url/2snvGcs46hZqixFW9qmIv23YQOR.dyn) (9.6 KB) [Drawing3.dwg](https://forum.dynamobim.com/uploads/short-url/sdNL7OnMVrLNp1Ag6vcnaokEwN8.dwg) (36.4 KB) [Drawing4.dwg](https://forum.dynamobim.com/uploads/short-url/kZrQ2sbVzQ1jXI413LAjQELOw4g.dwg) (36.4 KB)

> [@Use AutoCAD to drive floor objects](https://forum.dynamobim.com/t/use-autocad-to-drive-floor-objects/9596/9):
>
> Hi @Chandrasekar_Rajaman It is working as expected. There are couple of inputs you missed. And here is the file [Convert CAD Outlines to Floor Slabs(For Chadrashekhar).dyn](https://forum.dynamobim.com/uploads/short-url/mqwQ8S6kDYHrqj1tdKH00LGFSkl.dyn) (15.3 KB)

> [@Curves From Cad layers](https://forum.dynamobim.com/t/curves-from-cad-layers/15433):
>
> Hi, I’m trying to convert lines from DWG to curves in Revit. This node is from BIMORPH. Should work… is equal all examples in website, i think that isn’t working because i’m using Revit 2018. Anyway… is anybody knows how to convert a line to a curve? i need a curve to create walls…

Revit 2018  
Dynamo 1.3.2  
bimorphNodes 2.2.70

Thanks  
Ben

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 27, 2018, 5:56pm UTC](https://forum.dynamobim.com/t/extracting-cad-layers/20498/2 "2018-03-27T17:56:51Z")

</div>

Hi @BenjaminDoty

Could you drop dwg file here?

---

<div class="post-metadata">

**Author:** ![BenjaminDoty](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@BenjaminDoty](https://forum.dynamobim.com/u/BenjaminDoty)\
**Post date:** [March 27, 2018, 5:59pm UTC](https://forum.dynamobim.com/t/extracting-cad-layers/20498/3 "2018-03-27T17:59:02Z")

</div>

Here is the CAD file. I think it is pretty well cleaned.

[2018\_0326 MINT Export.dwg](https://forum.dynamobim.com/uploads/short-url/94d9wrmhdXErJBPBNCU5LFDqrVQ.dwg) (1.7 MB)

Thanks

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [March 27, 2018, 11:14pm UTC](https://forum.dynamobim.com/t/extracting-cad-layers/20498/4 "2018-03-27T23:14:39Z")

</div>

Hi @BenjaminDoty the problem is caused by the elements in your DWG; they import as meshes which means the CurveFromCADLayers node has nothing to convert. In theory, it’s possible to extract the boundaries of a mesh, however the last time I looked at this there was no simple way to know which vertices we’re connected by an edge (which can then be converted to a Proto curve) and which vertices were unrelated and not connected by an edge - like what results in your file as a consequence of the separated profiles - so meshes remain unsupported by the node.

The simplest solution is to either explode your polygons in AutoCad before linking/importing the DWG into Revit or convert them to polylines, both of which should convert without issue. 3D lines are supported too, but only within the limits of the Autodesk ShapeManager (so non-planar curves are flattened to the plane for example).

---

<div class="post-metadata">

**Author:** ![BenjaminDoty](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@BenjaminDoty](https://forum.dynamobim.com/u/BenjaminDoty)\
**Post date:** [March 27, 2018, 11:19pm UTC](https://forum.dynamobim.com/t/extracting-cad-layers/20498/5 "2018-03-27T23:19:06Z")

</div>

@Thomas_Mahon Thanks for the input. I will check out the original CAD file and see what I can do. Cheers!

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 28, 2018, 6:45am UTC](https://forum.dynamobim.com/t/extracting-cad-layers/20498/6 "2018-03-28T06:45:31Z")

</div>

@BenjaminDoty You see how it helps others to find the issue if anyone drop relevant files. Thanks to @Thomas_Mahon for pointing out. This is how we can extract boundaries from Mesh:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/9/0946be31a17a0579ed180daa8dcc52748adc9c1e.png)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/f/2fe3e34e58e5b8082e62eec87498c140a9366de4.png)

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [March 29, 2018, 12:01pm UTC](https://forum.dynamobim.com/t/extracting-cad-layers/20498/7 "2018-03-29T12:01:54Z")

</div>

Thanks for the alternative solution @Kulkul  
I’m aware it’s possible - I was speaking specifically about limitations of meshes extracted from DWGs in the Revit API context, where such a solution isn’t possible (no mesh toolkit)!
