Hi,
I'm curently migrating my projects from oarx2012 to oarx2015, I'm facing an issue regarding thumbnail generation of "standalone" databases. I formerly use an undocumented function existing in "acblock.arx": "acdbMakeDrawingPreview".
This function has been removed from acblock.arx and hasn't been replaced.
What, in your mind, would be the best replacement method to create a thumbnail bitmap and store it into dwg as acad do?
Thanks
loic
Solved! Go to Solution.
Solved by Alexander.Rivilis. Go to Solution.
in few words: open (dwg, not only a database), zoom extents, save, close.
this will generate a preview image of a good resolution for any dwg that you need :).
the only disadvantage is that a drawing is blinking for a second, because it must be visible for thumbnail creation.
but as for me its better to let the autocad does what it can do, and add 10 lines of source code to help, than create a great quantity of code that may become deprecated in several years 🙂
IMHO, stopped using "acblock.arx" since Autocad 2008, because of it's poor functionality (polyline width, rounded elements, e.t.c.)
Hi nick83,
Thank you for your answer,
Opening drawings, setting the camera and saving to generate thumbnail is not an option for me. In my case, since I've just created a new in-memory database, that would mean saving the db, opening it in a doc, setting the view saving once again and closing the doc. It takes more than three times the time acblock took to generate the thumbnail, I generate files (ans thumbnails) in a kind of batch process, I sometimes process several hundreds of files.
I'm currently able to create an off-screen device to create a screenshot (Atil::Image) of modelspace in a pretty correct amount of time, I now have to put this Atil::Image into dwg thumbnail, probably using AcDbDatabase::setThumbnailBitmap but I still search for the best way to do this.
Thanks again
loic
@loic.jourdan wrote:
Hi,
I'm curently migrating my projects from oarx2012 to oarx2015, I'm facing an issue regarding thumbnail generation of "standalone" databases. I formerly use an undocumented function existing in "acblock.arx": "acdbMakeDrawingPreview".
This function has been removed from acblock.arx and hasn't been replaced.
What, in your mind, would be the best replacement method to create a thumbnail bitmap and store it into dwg as acad do?
Thanks
loic
acblock.crx has acdbMakeDrawingPreview function
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
you saved my day, thank you very much
loic