• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Active Member
    Posts: 6
    Registered: ‎04-16-2012

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

    373 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

    Please use plain text.
    Mentor
    Posts: 214
    Registered: ‎04-11-2010

    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 

     

     

    Please use plain text.
    Active Member
    Posts: 6
    Registered: ‎04-16-2012

    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

    Please use plain text.
    *Expert Elite*
    Posts: 6,416
    Registered: ‎06-29-2007

    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
    -------------------------------------------------------------------------
    Please use plain text.
    Mentor
    Posts: 214
    Registered: ‎04-11-2010

    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

    Please use plain text.