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

yang686526 2009-05-06 06:00 PM

【转帖】modelspace entities only
 
modelspace entities only
modelspace entities only
i got my stuff churning through entities and displaying them just dandy.
then it occurs to me i only want to display entities in modelspace only.
????
how do i search the database for modelspace entities only?
never mind
i figured it out after some sleep...

modelspace is the block "*model_space". another way to get the modelspace ist the function odªdbªdatabase::ªgetªmodelªspaceªid ().

when you like to display modelspace only, do something like that:
oddbdictionaryptr playoutdict = pdb->getlayoutdictionaryid().safeopenobject();
oddbdictionaryiteratorptr piter = playoutdict->newiterator();
bool bmodelspace = false;
while (!piter->done() || bmodelspace == true)
{
oddblayoutptr playout = piter->objectid().safeopenobject();
if (playout->getblocktablerecordid() == pdb->getmodelspaceid())
{
pdb->setcurrentlayout(playout->id());
bmodelspace = false;
}
piter->next();
}
sleep well
mathias


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