DwgPreviewControl

DwgPreviewControl

Anonymous
Not applicable
969 Views
1 Reply
Message 1 of 2

DwgPreviewControl

Anonymous
Not applicable

I'm trying to display block drawings on a form in Visual Studio 2015 by using the DwgPreviewControl.  Can anyone give me a hand to get started.

Thanks in advanced

Steven Houghton

0 Likes
970 Views
1 Reply
Reply (1)
Message 2 of 2

norman.yuan
Mentor
Mentor

You may want to clarify what is "a form in Visual Studio 2015". Do you mean a form in an Windows Form EXE application. or a form used in AutoCAD .NET API Add-in (DLL)?

 

Also, what is DwgPreviewControl? Is it the very old DwgThumbnail.ocx? DwgThumbnail.ocx has not been updated in at least last 10 years, if you can still find it. It may not be able to display preview bitmap image of latest drawing format (not sure for it, since I stopped use it since Acad2007). If you are doing AutoCAD .NET API add-in, you are likely using 64-bit AutoCAD, and that control (OCX file) is 32-bit, so not usable.

 

If you are using AutoCAD .NET API, you can easily access drawing preview with Database.ThumbnailBitMap. 

 

Alternatively, you can read preview image directly from *.DWG file without AutoCAD being involved. See discussions and code sample here

http://www.theswamp.org/index.php?topic=30985.0

 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes