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

yang686526 2009-05-04 06:29 PM

【转帖】crash in oddbhatchgetpattern
 
crash in oddbhatch::getpattern
crash in oddbhatch::getpattern
hello forum,
if i run the following code onto the attached dwg, i get a crash in getpattern.
my version is dwgdirect 2.4.1. could you explain me what is happening please ?
code:
blockrecord = database->getpaperspaceid().safeopenobject() ;
objectiterator = blockrecord->newiterator();
for(objectiterator->start() ; objectiterator->done() == false ; objectiterator->step())
{
oddbobjectptr obj = objectiterator->objectid().safeopenobject() ;
if(obj->iskindof(oddbhatch::desc()))
{
oddbhatchptr hatch = oddbhatch::cast(obj) ;
odhatchpattern pattern = hatch->getpattern() ;
}
}attached files
you can reproduce this exception in odamfcappdll 2.5.2 by pasting my piece of code in codamfcappdoc::onopendocument and opening crashhatch.dwg.
see the attached jpeg.
attached images (188.1 kb, 5 views)

i entered defect 5089 for this problem and fixed it.
the paper layout in the drawing contains no viewports (and where is no overall viewport too).
sergey slezkin


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