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

yang686526 2009-05-05 11:08 AM

【转帖】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


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