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.
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.
Depending on which of these options suit your application, I will be glad to provide you more information if you need.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register