I have a acThumb.ocx and it works fine on 32 bits AutoCAD 2008.
Now I need to have the same functionality in 64 bits in AutoCAD 2008.
I have read all the forum threads around and there were examples like this one :
and this one :
and here :
... and more.
The problem is that Tonys http://www.caddzone.com/BlockIconSample.zip works fine when the block is already inside the current dwg. I tried to modfiy the db like this: (but it does not work)
// this - does not work
Database db = new Database(false, true);
string sourceDrawing = "C:\\134160.dwg";
db.ReadDwgFile(sourceDrawing, System.IO.FileShare.Read, true, "");
//instead of this which works fine
//Database db = AcadApp.DocumentManager.MdiActiveDocument.Database
The DWG is WBLOCK-created block and I suppose that it does not have preview before loading into MDIActiveDocument. I want to gets its preview witho
Old acThumb.ocx does the work, but I cant find a way to do this in AutoCAD 2008 in 64 bits.
Can you help me with a suggestion or code?
Solved! Go to Solution.
Database db = new Database(false, false);/////When you set to true associating this database to the current document
db.ReadDwgFile("C:\\134160.dwg",FileOpenMode.OpenForReadAndReadShare, False, ""); /// This should not really matter
Bitmap bitmp = db.ThumbnailBitmap
Access a broad range of knowledge to help get the most out of your products and services.