几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】problems getting metafile from oddbole2frame (http://www.dimcax.com/hust/showthread.php?t=18199)

yang686526 2009-05-06 11:45 PM

【转帖】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.


所有的时间均为北京时间。 现在的时间是 02:05 AM.