查看单个帖子
旧 2009-05-06, 11:45 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】problems getting metafile from oddbole2frame

problems getting metafile from oddbole2frame
problems getting metafile from oddbole2frame
hello everybody!
we are using dd(1.11.01.00) for reading dxf/dwg files.
when i'm trying to get metafile for ole2 frame in following code:
odgimetafileptr pmetafile = pole2frame->getmetafile();
if(!pmetafile.isnull()){
uint datasize = pmetafile->datasize();
}
in datasize() i got an exception of class odolestorageerror with description like "object not exists".
it seems that i miss something because odamfcapp.exe displays this ole2frame object normally.
plz help me to solve this problem.
thanks.
shurik
still having problems...
hello everybuddy!
in my previous post i don't know exactly which object is not exists.
my guess is that it should be some object of class derived from odolestorage (probably odolestorageimpl).
probably it should be created using:
static odolestorageptr odolestorage::createserviceobject(odbytedata* pinitdata)
where pinitdata probobly can be get from oddbole2frame using:
odbytedataptr oddbole2frame::compdocfile(bool bforwrite)
is my guess right? and what else should i do with created service object? just creating it is not enought.
i can't find any information about using odolestorage in dd help, in dd forum and in dd samples.
can anyone help me? any help would be highly appreciated.
shurik
hi shurik,
odolestorageerror exception is thrown from odolestorageimpl object that already created by that time. most likely the stream or storage queried inside getmetafile() does not exist.
anyway, i suggest you to copy doc data via oddbole2frame::compdocfile() and call oleload() on that copy to get any desired information.
dmitry.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)