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

yang686526 2009-05-06 11:16 PM

【转帖】problem with erasing paperspace viewports
 
problem with erasing paperspace viewports
problem with erasing paperspace viewports
hi,
it seems there is a problme when we erase a paperspace viewport - some object id of the erased viewport remains registered somewhere.
here is how to simulate this bug.
first set the active layout to be layout1.
run this code in the odamfcapp:
code:
нино (11:02 am) :
//test fow switch to layout when the last created viewport in it is erased
oddbobjectid idvp;
oddbdatabaseptr pdb = this->m_pdb;
{
oddbblocktablerecordptr precord = pdb->getactivelayoutbtrid().safeopenobject(oddb::kforwrite);
oddbviewportptr pvp = oddbviewport::createobject();
pvp->setdatabasedefaults(precord->database());
odgepoint3d ptcenter(1.,1.,0.);
pvp->setcenterpoint(ptcenter);
pvp->setheight(0.5);
pvp->setwidth(1.);
idvp = precord->appendoddbentity(pvp);
}
{
oddbviewportptr pview = idvp.safeopenobject(oddb::kforwrite);
pview->erase();
}
then switch to layout2 and then back to layout1 (no redraw).
an error is thrown for erased object.
best regards
chudomir


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