TheSwamp

Code Red => .NET => Topic started by: farrukh on March 20, 2013, 09:34:24 AM

Title: Previewing DWG Viewer other than DWG True View...
Post by: farrukh on March 20, 2013, 09:34:24 AM
Hi experts,

I'm working with AutoCAD 2012 x64 and I need a control to view DWG files selected in my ListView. I tried using DWG True View 2013 and it worked well, but this is more than my requirement. My requirement is to simply show a preview of the drawing. But DWGTrue View is an advance control and is not standalone i.e. Users have to download and install its full installer.

I'm seeking help from Kean's blog post http://through-the-interface.typepad.com/through_the_interface/2008/06/autocad-net-ver.html#comment-6a00d83452464869e2017c37f2b32e970b (http://through-the-interface.typepad.com/through_the_interface/2008/06/autocad-net-ver.html#comment-6a00d83452464869e2017c37f2b32e970b) but this might require some customization to code in order to fix TOP View and do a Zoom Extent: Currently not succeeded.

I also seek using DWGThumnailviewer.ocx referenced in this post http://through-the-interface.typepad.com/through_the_interface/2007/10/au-handouts-t-1.html#comment-6a00d83452464869e2017c37f2e993970b (http://through-the-interface.typepad.com/through_the_interface/2007/10/au-handouts-t-1.html#comment-6a00d83452464869e2017c37f2e993970b)but unfortunately, I couldn't find DWGThumnailViewer.ocx with AutoCAD 2012. I guess it was discontinued.

Other option could be to generate a raster graphic file (*.jpg, *.gif, *.png, *.bmp) and display that into a picture box. I tried some code from this thread http://www.theswamp.org/index.php?topic=26621.msg335328#msg335328 (http://www.theswamp.org/index.php?topic=26621.msg335328#msg335328) and this one http://www.theswamp.org/index.php?topic=25253.0 (http://www.theswamp.org/index.php?topic=25253.0) but at  some small dwg files, it is unable to read bytes.

Any suggestions or help, would really be appreciated.

Thanks a bunch.
Title: Re: Previewing DWG Viewer other than DWG True View...
Post by: WILL HATCH on March 20, 2013, 10:31:11 AM
 http://www.theswamp.org/index.php?topic=30985.0  (http://www.theswamp.org/index.php?topic=30985.0)
Title: Re: Previewing DWG Viewer other than DWG True View...
Post by: mohnston on March 20, 2013, 12:16:01 PM
If you are a member of ADN they have a control that works nicely. DwgThumbnail.ocx