Author Topic: Looking for ideas to stop bitmap preview  (Read 215 times)

0 Members and 1 Guest are viewing this topic.

hobleglobsquishyworms

  • Swamp Rat
  • Posts: 779
  • .net stuff
Looking for ideas to stop bitmap preview
« on: July 26, 2019, 04:52:05 PM »
Looking for ideas on how to stop this preview code when the effort takes too long. Some drawings it seems to struggle with.

Code: [Select]
BlockTable bt = (BlockTable)tr.GetObject(OuterDB.BlockTableId, OpenMode.ForRead);
BlockTableRecord blk = (BlockTableRecord)tr.GetObject(bt["*Model_Space"], OpenMode.ForRead);
var imgsrc = Autodesk.AutoCAD.Windows.Data.CMLContentSearchPreviews.GetBlockTRThumbnail(blk);
var bmp = ImageSourceToGDI(imgsrc as System.Windows.Media.Imaging.BitmapSource);
pictureBox1.Image = bmp as System.Drawing.Bitmap;