# CAD files in version 10

**URL:** <https://community.thinkgeo.com/t/cad-files-in-version-10/9943>\
**Category:** WebForms\
**Created:** [October 30, 2020, 3:03pm UTC](https://community.thinkgeo.com/t/cad-files-in-version-10/9943 "2020-10-30T15:03:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmabon](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/jmabon/32/21163_2.png) [@jmabon](https://community.thinkgeo.com/u/jmabon)\
**Post date:** [October 30, 2020, 3:03pm UTC](https://community.thinkgeo.com/t/cad-files-in-version-10/9943/1 "2020-10-30T15:03:44Z")

</div>

Hello,

I’m trying to load a CAD file in Version 10 and get an error when I call .open on the layer:  
“The type initializer for ‘ThinkGeo.MapSuite.Layers.CadFeatureSource’ threw an exception.”  
I have attached a sample app I’ve created. Can someone take a look and see if I’m missing any dlls or settings?  
I removed the main ThinkGeo.MapSuite.dll from the zip to meet the upload limits.

Thanks,  
Jesse

[CADsample.zip](https://community.thinkgeo.com/uploads/short-url/r903OyIPPc6SDebtYOyw9q9NzTD.zip) (3.7 MB)  
[Bin.zip](https://community.thinkgeo.com/uploads/short-url/8RKCVHGpU8wTbfN8MuH6rTioIUX.zip) (3.8 MB)

---

<div class="post-metadata">

**Author:** ![Frank4](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/frank4/32/25224_2.png) [@Frank4](https://community.thinkgeo.com/u/Frank4)\
**Post date:** [October 30, 2020, 9:16pm UTC](https://community.thinkgeo.com/t/cad-files-in-version-10/9943/2 "2020-10-30T21:16:57Z")

</div>

Thanks Jmabon,  
I looked into the detail. I found you miss two folder in the bin folder for some reason.

 ![image](https://community.thinkgeo.com/uploads/default/original/3X/6/e/6e7b2d73c1635d31a4ab0aeca209db67611cacbf.png)

I attached you the whole project here.

> **[CADsample.zip](https://drive.google.com/file/d/1SfekK5_WA3pRPeUyyVsmiWQXpPDgNE4g/view?usp=sharing)**
>
> Google Drive file.

There are two more thing I changed.

1. Set the fixed width and height for the map  
\<cc1:Map ID=“mapMain” runat=“server” Height=“800px” Width=“1000px”\>  
\</cc1:Map\>
2. Set the meter as the unit.  
mapMain.MapUnit = GeographyUnit.Meter

You will get

 ![image](https://community.thinkgeo.com/uploads/default/original/3X/2/d/2dc1537b01f6a0e852316a3e15acc1e1a8c83a56.png)

Thanks

Frank

---

<div class="post-metadata">

**Author:** ![jmabon](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/jmabon/32/21163_2.png) [@jmabon](https://community.thinkgeo.com/u/jmabon)\
**Post date:** [November 2, 2020, 3:28pm UTC](https://community.thinkgeo.com/t/cad-files-in-version-10/9943/3 "2020-11-02T15:28:27Z")

</div>

Thanks Frank,

I was able to get it running in my main project. However, one of the DWG files I have does not load correctly.  
It looks like this when I load it into a CAD viewer:

 ![image](https://community.thinkgeo.com/uploads/default/original/3X/a/8/a8ffae1d0c2ffb35b528f9d28f482b69476bf983.png)

But when I load it into the sample project it looks like part of it is split apart and the styling is gone. Is there any type of documentation on using the CAD layers dealing with projections? Or is there any info on what version of dwg files are acceptable or if they need to be created in a certain format to view in the ThinkGeo control? I’ve attached the dwg file so you can take a look at it as well.

Thanks,  
Jesse

[SEC 10 ENGBASE\_091520.zip](https://community.thinkgeo.com/uploads/short-url/q3qwwAgSVokarJuGpOWLVcLy9Op.zip) (700.3 KB)

---

<div class="post-metadata">

**Author:** ![Frank4](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/frank4/32/25224_2.png) [@Frank4](https://community.thinkgeo.com/u/Frank4)\
**Post date:** [November 2, 2020, 8:43pm UTC](https://community.thinkgeo.com/t/cad-files-in-version-10/9943/4 "2020-11-02T20:43:59Z")

</div>

Thanks Jesse,  
Yes. We saw this issue before. There are some Guidance for the CAD creation/modification.

Guidance

1. The ThinkGeo Mapsuite support open the DWG/DXF 2013 and the older version. So make sure covert your drawing to one of these versions.

2. Do not use the block references. If you have to use block references do not have the spline in the block. If we have to use spline in the block just make sure convert it to polyline after modification done.

For your case I think it is about #2. All features can display on the map but in different location. You could move the features out of the block references.

Thanks

Frank
