ThinkGeo.com    |     Documentation    |     Premium Support

CAD files in version 10

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 (3.7 MB)
Bin.zip (3.8 MB)

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

I attached you the whole project here.

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

Thanks

Frank

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:

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 (700.3 KB)

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