.NET

Reply
Active Member
hmshettikera
Posts: 6
Registered: ‎04-16-2012
Message 1 of 5 (651 Views)

Extracting dwg drwaing file(.dwg) data in visual studio 2010(using c# asp.net)

651 Views, 4 Replies
05-03-2012 01:01 AM

1)I need to extract the data of an .dwg file using Visual studio and AUTOCAD. Here i need to pass the data from autocad to my asp.net application when i load the .dwg file into AUTOCAD and click "Extract" Custom menu.

2)How to add "Extract" custom menu to Autocad Application and how to open my asp.net application after clicking on it

Valued Mentor
gasty1001
Posts: 437
Registered: ‎04-11-2010
Message 2 of 5 (625 Views)

Re: Extracting dwg drwaing file(.dwg) data in visual studio 2010(using c# asp.ne

05-03-2012 09:18 AM in reply to: hmshettikera

Hi,

 

I think you have to be more explicit:

 

1.- What kind of data?,  a dwg file can contain a lot of different kind of data: geometry, attributes, anotations, text, hyperlinks, dblinks, images, time stamp, etc. So you need to make clear what kind of data you need to extract from a dwg file. 

 

2.- Output format, you say that a ASP .NET application will comsume the data, what format your data  need to feed that application.

 

3.- There are several ways to start an application from managed code:  you can embed a browser (Webbrowser control ) in a form, you can start a browser from code (via ShellExecute or other mechanism)

 

4.- To add a menu (or menu group) to AutoCAD from code you can check this link: http://through-the-interface.typepad.com/through_the_interface/2010/04/adding-to-autocads-applicatio...

 

5.- Platform, better you say in what platform are you working, or deploying the application to. AutoCAD or vertical version, OS, 32/64 bits, and VS version.

 

Gaston Nunez 

 

 

Active Member
hmshettikera
Posts: 6
Registered: ‎04-16-2012
Message 3 of 5 (610 Views)

Re: Extracting dwg drwaing file(.dwg) data in visual studio 2010(using c# asp.ne

05-04-2012 07:07 AM in reply to: gasty1001

Thank you for reply.

I am a .Net developer(c# asp.net) and usually we work on .Net framework 4.0(Visual Studio 2010).

Our aim is to to extract the geometry, attributes, anotations, text, hyperlinks fields when user clicks a Custom menu( say "Extract Now" menu item).

 

1)User opens .dwg file in Autocad 2012/13

2) He can click a custom menu and after click, all data of that image should be exported to .net application(preferably Dotnet web application)

3) user can see on the browser what data he has extracted and which data wants to save in sql server

 

I hope this forum is right place to ask this question

*Expert Elite*
Alfred.NESWADBA
Posts: 8,865
Registered: ‎06-29-2007
Message 4 of 5 (605 Views)

Re: Extracting dwg drwaing file(.dwg) data in visual studio 2010(using c# asp.ne

05-04-2012 07:18 AM in reply to: hmshettikera

Hi,

 

>> I hope this forum is right place to ask this question

For questions ... yes

For getting it done for you .... no :smileyhappy:

 

And as a short answer, there is no function for "extract my drawing to sql-server", if that was the question.

Well, one option may be if you think about GIS-data and you have Map3D or Civil3D (having Map3D-functionality built in) as your vertical product. If so, let us know, for now I don't see any sysinfo what you are using currently.

 

>> Our aim is to to extract the geometry

At least you have to write your own export-engine. And that's not a one-day-job as there are a lot of different geometry-types within AutoCAD plus a lot of different object-types used in drawings created by vertical AutoCAD-based products (ACA, MEP, Civil3D, Map3D) and last-but-not least every developer may have written his own object-types.

 

At the moment I stop here, would be great to know a little bit more detailed the goals you'd like to get done.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Valued Mentor
gasty1001
Posts: 437
Registered: ‎04-11-2010
Message 5 of 5 (605 Views)

Re: Extracting dwg drwaing file(.dwg) data in visual studio 2010(using c# asp.ne

05-04-2012 07:22 AM in reply to: hmshettikera

Hi,

 

I guess you are new to AutoCAD, my advice is to check the data extraction command in AutoCAD (type DATAEXTRACTION at the command line) before to code a single line in .NET. Maybe you only need to process the output file generated, and not to learn a new API.

 

Gaston Nunez

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community