![]() |
【转帖】keepingthumnail when opening drawing
keepingthumnail when opening drawing
keepingthumnail when opening drawing i'm using code belowto open a dwg but when i save,the thumbnailis not there anymore. howdo i keep the the thumbnail ?. m_pdatabase = oddbhostappservices::createdatabase(); m_pdatabase->setretainoriginalthumbnailbitmap(true); m_pdatabase = readfile (bstrdrawingfilename, false, false, oda::ksharedenyno, odpassword); thx cp one of optional oddbdatabse::writefile() parameters is responsible for writing preview to file. btw, if it was not loaded from file (or was erased) it will be generated by dd (surely it takes time). by default this parameter is false. sergey slezkin i haveset the parameter in writefile but the thumbnailis not cominbg out. it is not being loaded when i read the file. should this code loadthe thumbnail ? m_pdatabase = oddbhostappservices::createdatabase(); m_pdatabase->setretainoriginalthumbnailbitmap(true); m_pdatabase = readfile (bstrdrawingfilename, false, false, oda::ksharedenyno, odpassword); thx cp your code should load preview from file if it exists in the file (it may be absent) does autocad (or odamfcapp) show the preview? if not - it's absent. sergey slezkin the thumbnail is in the dwg file, autocad and odamfcapp can seethethumbnail but not after i have saved the file using writefile() cp which format/version are you saving to? (r12 has no preview image). while saving to latest versions preview should be generated even if it was not loaded from file. but generating preview requires that your oddbsystemservices inheritor return not null from gsbitmapdevice() function. btw, odamfcapp sample saves files with preview if tools/options/save preview is checked. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 10:44 AM. |