.NET

.NET

Reply
New Member
rharrison49
Posts: 1
Registered: ‎04-16-2013
Message 1 of 2 (239 Views)

Open and display autocad file in .net

239 Views, 1 Replies
04-16-2013 01:22 PM

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.

ADN Support Specialist
Balaji_Ram
Posts: 749
Registered: ‎03-21-2011
Message 2 of 2 (164 Views)

Re: Open and display autocad file in .net

05-09-2013 01:48 AM in reply to: rharrison49

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

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.