ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ObjectArx 2015 - Generate file thumbnail for "standalone" database

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
loic.jourdan
1048 Views, 4 Replies

ObjectArx 2015 - Generate file thumbnail for "standalone" database

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

----
20-20 CAD / 20-20 Technologies
4 REPLIES 4
Message 2 of 5
nick83
in reply to: loic.jourdan

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.)

Message 3 of 5
loic.jourdan
in reply to: nick83

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

----
20-20 CAD / 20-20 Technologies
Message 4 of 5


@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
Expert Elite Member

Message 5 of 5

you saved my day, thank you very much

 

loic

----
20-20 CAD / 20-20 Technologies

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost