Code Red > .NET

Looking for ideas to stop bitmap preview

(1/1)

nobody:
Looking for ideas on how to stop this preview code when the effort takes too long. Some drawings it seems to struggle with.


--- Code: ---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;

--- End code ---

Navigation

[0] Message Index

Go to full version