Export a drawing into shape format

Export a drawing into shape format

Anonymous
Not applicable
2,076 Views
15 Replies
Message 1 of 16

Export a drawing into shape format

Anonymous
Not applicable

Hello, 

 

I need to export a drawing into shape format. (file with extention '.shp') usinf C#.

 

regards

0 Likes
2,077 Views
15 Replies
Replies (15)
Message 2 of 16

norman.yuan
Mentor
Mentor

Vanilla AutoCAD itself does not have shape exporting functionality built-in. I am not sure whether there is third party tool that works with AutoCAD can do that.

 

However, if you use AutoCAD Map 3D (or Civil 3D), it has built-in shape exporting functionality, which can be easily driven with LISP code and also exposed as AutoCAD Map .NET API. 

 

Since you are asking this in programming forum, I assume you want to do it programmatically. Thus, if you do use AutoCAD Map/Civil, you can download AutoCAD Map ObjectARX SDK. In the download, you can find .NET sample code that does the shape exporting/importing.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 16

Anonymous
Not applicable

Thank you for your reply, yes i need to do that programmatically using Autocad 2013 and .NET API and C# language. 

0 Likes
Message 4 of 16

norman.yuan
Mentor
Mentor

Then, you need AutoCAD Map/Civil3D.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 5 of 16

Anonymous
Not applicable

But i must use autocad 2013. is there any solution ! 

0 Likes
Message 6 of 16

Anonymous
Not applicable

is there any solution please ! 

0 Likes
Message 7 of 16

norman.yuan
Mentor
Mentor

Any solution? Yes, or no, depending what you are capable to do:

 

1. Get ESRI shape specification document, build your own shape file exporting tool. You need to be expert of AutoCAD, and very good programmer that can translate Shape specification into code. Unless you have a team and do it for commercial solution, this is likely not viable at all for you as an option.

 

2. Find third party shape file building tool, components. There are some of them, mostly paid commercial ones. But it is likely you still need to be AutoCAD programming expert to collect AutoCAD data (geometries, attribute data...) to feed these shape building components. 

 

Because of the question you are asking here, the above options, I figure, are not suitable in terms of time/money to be invested.

 

3. Use AutoCAD MAP/Civil3D (especially when you are working in "geoinformation" field)! Either option above would cost you way more than a license of AutoCAD Map/Civil3D.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 8 of 16

hgasty1001
Advisor
Advisor

Hi,

 

ESRI has a plugin for AutoCAD, while I don't know about the capabilities of the plugin, it seems to accomplish your needs: ArcGIS for Autocad

 

Gaston Nunez 

0 Likes
Message 9 of 16

Anonymous
Not applicable

@hgasty1001 Thank you for your answer, bu i need a c# library to do this to have the file from an autocad plugin, do you have an idea about this ?

0 Likes
Message 10 of 16

Anonymous
Not applicable

Hello @norman.yuan

 

Thank you very much for your answer and your effort,

 

- firstly i don't have a group I'm just a student and I need this for my graduation project, i can't read shape specification document,and build my own shape file exporting tool because I don't have enough time. 

 

- I want to ask you more details about the shape file building tool components,

 

    - do you know an example ?

    - can i develop a plugin with autocad dotnet and c # and connect it with this tool because.

 

- Do you know a c# library to do this to have the shape file from an autocad plugin ?

 

I am waiting for your answer. Thank you.

 

Regards.

 

0 Likes
Message 11 of 16

BKSpurgeon
Collaborator
Collaborator

perhaps -- if you will permit me -- if you describe the general problem in a high level - perhaps someone can consider an alternative solution to exporting the file.

 

secondly - what types exactly are you planning on exporting? 

 

perhaps you can obtain a student license. or if it's a project that due soon, you can download a trial full version of the relevant autocad software which allows you to do it via the API as @norman.yuan has suggested.

0 Likes
Message 12 of 16

Anonymous
Not applicable

I have a 3D cartography of the space, a plan with several layers of information such as buildings, roads ... and I need to export this plan in shape format such that the layers become the layers of the SHP file.

 

I have all technologies Autocad, Autocad .NET API, and ObjecARX library.

0 Likes
Message 13 of 16

ActivistInvestor
Mentor
Mentor

@Anonymous wrote:

Hello @norman.yuan

 

Thank you very much for your answer and your effort,

 

- firstly i don't have a group I'm just a student and I need this for my graduation project, i can't read shape specification document,and build my own shape file exporting tool because I don't have enough time. 

 


If you are a student, and do not have student-access to the Autodesk products needed to do what you seek (namely Civil3D), then something just doesn't add up.

 

Students generally have access to any Autodesk products they need, and are not limited to using AutoCAD 2013 (or at least, that's the case here in the US).

0 Likes
Message 14 of 16

norman.yuan
Mentor
Mentor

I am not sure how to make it clearer:

 

As a student with limited time/financial support, with only vanilla AutoCAD, it is simply NO POSSIBLE to develop something that generating shape file from AutoCAD document. Period. You either need to find third party software support that can get shape exporting required data from AutoCAD document and generate the shape file (mostly would be commercial ones, and expensive); or you get AutoCAD Map3D/Civil3D. It is likely buying third party software support costs more than getting AutoCAD Map/Civil 3D.

 

I saw you also post the same question in AutoCAD Map forum, but without AutoCAD Map, posting there does not help at all.

 

As student, you can get vanilla AutoCAD, I believe you can also use AutoCAD Map for free. So, why keep insisting on using vanilla AutoCAD to do something next to impossible? If your development is not for study (thus free AutoCAD/AutoCAD Map/Civil license), then buying AutoCAD Map would be the best option you can choose.

Norman Yuan

Drive CAD With Code

EESignature

Message 15 of 16

Anonymous
Not applicable

It is possible, i've made the same thing to make GeoJSON representing parcels which are drawn as closed polylines on a specified layer, same applies to other "entities of interests" roads, infrastructure etc. 

I can help you code that class easily, just let me know about the deadline.

Message 16 of 16

Anonymous
Not applicable

I'm sorry for the late feedback, thank you very much, i need to do that as soon as possible, can you give me more details.

0 Likes