几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】raster image import problem (http://www.dimcax.com/hust/showthread.php?t=18319)

yang686526 2009-05-07 12:21 PM

【转帖】raster image import problem
 
raster image import problem
raster image import problem
i want to get the raster image's source file name, so i'm trying to get oddbrasterimagedef object id from oddbrasterimage object by such a following code.
------
oddbobjectid objectid = pimage->imagedefid();
if (objectid.isnull() || !objectid.isvalid() || objectid.iserased())
{
return;
}
oddbrasterimagedefptr pdef = objectid.safeopenobject();
------
but safeopenobject() method throws an exception(oderror @ 0x0013adf0).
this problem is also occurred in the odreadex sample project by attached dwg file.(in odreadex, oddbrasterimage::imagesize() method throws exception too, so i have avoided it by calling imagesize() with getcachedvalue=true.)
please teach me how to avoid this problem.
p.s.
my environment is visual studio .net 2003, dwgdirect version 2.04.01(lib type=vc2003mdd).
attached files
the file is invalid. it contains rasterimagedef object but has no image dictionary entry in named objects dictionary.
exactly the same problem was discussed here:
sergey slezkin

dear sergey,
i have understood.
thank you very much!


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