查看单个帖子
旧 2009-05-05, 11:08 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】from odlylayerfilterptr to odlylayergroup

from odlylayerfilterptr to odlylayergroup
from odlylayerfilterptr to odlylayergroup
could not find how to reach the layer list in a leaf layerfilter.
i do this :
odlylayerfiltermanagerptr paclayergroupstree= odlygetlayerfiltermanager( pdb);
odresult err= paclayergroupstree->getfilters(prootlayergroups,pcurrentlayergroup) ;
odlylayerfilterarray paclayergroupsarray= prootlayergroups->getnestedfilters();
....
odlylayerfilterptr thecombination= paclayergroupsarray[i];
and now how do i get the odlylayergroup for this layerfilter ?
thanks for any help
try this:
odlylayergroup *group = (odlylayergroup *) thecombination.get();
oddbobjectidarray ids = group->layerids();
hi,
[dwgdirect version 2.04.02, windows 32 bits, ms visual c6]
i am appending these codes to the odreadex:
/****************/
odlylayerfilterptr prootlayergroups,pcurrentlayergroup;
odlylayerfiltermanagerptr paclayergroupstree=
odlygetlayerfiltermanager(pdb);
odresult err= paclayergroupstree->getfilters(prootlayergroups,
pcurrentlayergroup) ;
odlylayerfilterarray paclayergroupsarray=
prootlayergroups->getnestedfilters();
for ( unsigned int i = 0; i < paclayergroupsarray.length(); i++ )
{
odlylayerfilterptr thecombination= paclayergroupsarray[i];
odlylayergroup *group = (odlylayergroup *) thecombination.get();
oddbobjectidarray ids = group->layerids();
}
/*****************/
but the call to group->layerids() gives me an exception.
have the codes changed in this new release "dwgdirect version 2.04.02"
any suggestion will be greatly appreciated.
many thanks,
last edited by sydiab; 8th october 2007 at 07:38 amfff">.
does the code fail for any file?
are you sure there are only group filters? (what isidfilter() returns?)
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)