.NET

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

Import ESRI SHP to AutoCAD with C#

529 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,064
Registered: ‎04-27-2009
Message 2 of 4 (518 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 (507 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,064
Registered: ‎04-27-2009
Message 4 of 4 (497 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
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.