.NET

Reply
Member
vzavec
Posts: 5
Registered: ‎10-08-2012
Message 1 of 4 (497 Views)

Import ESRI SHP to AutoCAD with C#

497 Views, 3 Replies
01-31-2013 06:22 AM

Hi!

 

Need help on this problem, can one direct me to similar examples or peace of code.

Cheers, VZ

*Expert Elite*
norman.yuan
Posts: 1,013
Registered: ‎04-27-2009
Message 2 of 4 (486 Views)

Re: Import ESRI SHP to AutoCAD with C#

01-31-2013 06:54 AM in reply to: vzavec

Are you using vanilla AutoCAD or AutoCAD Map/Civil 3D?

 

For the latter, there is Map ObjectARX .NET API for Importing/Exporting SHAPE to/from Acad MAP, which does basically what the command MapImport/MapExport do.

 

If you use plain AutoCAD, unfortunately, there is not AutoCAD .NET API that deals with SHAPE file. However, you can down load FDO libabry from http://www.osgeo.org/home to read/write geometries and its attribute data defined in SHAPE file.

 

Actually, if you use Acad Map/Civil, the FDO library is installed with Acad Map, so you can deal with SHAPE file either with Acad Map's importing/exporting API, or with FDO.

 

Member
vzavec
Posts: 5
Registered: ‎10-08-2012
Message 3 of 4 (475 Views)

Re: Import ESRI SHP to AutoCAD with C#

01-31-2013 09:41 AM in reply to: norman.yuan

Hi,

 

thanks for quick response, I am using AutoCAD Map/Civil 3D and will try with Map ObjectARX .NET API.

 

Is there any example written in C#?

 

Cheers, Vojko

*Expert Elite*
norman.yuan
Posts: 1,013
Registered: ‎04-27-2009
Message 4 of 4 (465 Views)

Re: Import ESRI SHP to AutoCAD with C#

01-31-2013 12:26 PM in reply to: vzavec

If you have not downloaded AutoCAD Map ObjectARX SDK (which is not same as AutoCAD ObjectARX SDK), downloaded. It comes with Map ObjectARX NET API code samples. The one you want to look into is DOTNET sample project "ImportExport". The documentaion coming with the Map ObjectARX SDK also have some code snippets.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.