查看单个帖子
旧 2009-05-06, 06:00 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)