![]() |
【转帖】entities in layouts are invisible
entities in layouts are invisible
entities in layouts are invisible hi! i have a problem. use code below to put entities from model space of one drawing into layout of other drawing. code: oddbblocktablerecordptr presultspace; oddbdictionaryptr playoutdict = pdb->getlayoutdictionaryid().safeopenobject(); oddbdictionaryiteratorptr piter = playoutdict->newiterator(); while (!piter->done()) { oddblayoutptr presultlayout = piter->objectid().safeopenobject(); odstring strlayoutname = presultlayout->getlayoutname(); strlayoutname.makelower(); if ( strlayoutname == str_tmp.makelower()) { str_tmp = tmp_listfiles.front().c_str(); presultspace = presultlayout->getblocktablerecordid().openobject(oddb::kforwrite); db_tmp = m_svcs.readfile(str_tmp,false,false); oddbobjectid idblk = layout->getblocktablerecordid(); oddbblocktablerecordptr pblk = idblk.openobject(oddb::kforwrite); pdb->insert(pblk->getname(), db_tmp, false); { oddbobjectid actid = presultlayout->lastactivevportid(); if (actid) { oddbviewportptr pvp = actid.safeopenobject(oddb::kforwrite); pvp->zoomextents(); } } break; }//end if presultlayout = 0; piter->next(); }// end while presultspace = 0; after that, a context of database pdb is wrritten into file using writefile() function. i've checked that the drawing contains ellements in it's layouts but they are invisible. what am i doing wrong? i send an example. please help. it is emergency. thanks. attached files insert() function always creates a new block. in your sample file layout "1" is associated with block "*paper_space" and the entities are in "*paper_space0" block. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 09:28 AM. |