.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Open and display autocad file in .net

1 REPLY 1
Reply
Message 1 of 2
Anonymous
483 Views, 1 Reply

Open and display autocad file in .net

I have a client using autocad 2012. I have a .net application that typically uses a jpg, bmp, or wmf file to display a floor plan graphic that is loaded as the background to a custom control where other objects can be overlaid on top of the floor plan. The client would like to use his autocad floor plan drawings instead of the other graphic file types I support.

 

What would I need to do this in a vs2008 .net application? Another option could be to open the autocad file and convert it to one of the formats I alreay support.

 

Thank you in advance for your assistance.

1 REPLY 1
Message 2 of 2
Balaji_Ram
in reply to: Anonymous

Hi Harrison,

 

Sorry for the delay.

 

You can use the thumbnail image retrieved from the drawing and use it as a background, but I doubt if its image resolution will be good enough for your application to use as an underlay.

 

The other option could be to open the drawing in AutoCAD and plot it as an image of a required size. You can drive AutoCAD from an external exe using the AutoCAD COM API. After the image is generated, it can be used as an underlay insider your app. The advantage in this approach is the control over the size of the image.

 

If you can use AutoCAD 2013, you can try using the accoreconsole.exe which can also generate the image without having to start the AutoCAD UI. Your application can run this executable in the background to generate the image.

 

There are several blog posts in these blogs that discuss the generation of images from drawings.

http://through-the-interface.typepad.com/

http://adndevblog.typepad.com/autocad/

 

Depending on which of these options suit your application, I will be glad to provide you more information if you need.



Balaji
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost