几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】adding two xrefs with identical layer names (http://www.dimcax.com/hust/showthread.php?t=15055)

yang686526 2009-05-04 03:45 PM

【转帖】adding two xrefs with identical layer names
 
adding two xrefs with identical layer names
adding two xrefs with identical layer names
hello!
if i combine two dwgs to one using oddbxrefman:: functions and the two source dwgs have identical layers the resulting dwg file will then have duplicate layers. for example if there was a layer name "layer1" in both source drawings then in the result (after auditing) there will be layers : "layer1" and its duplicate "$ddt_audit_generated_(100)". we would like that only the "layer1" would exist in the result.
as we are now using library version 2.42, the older library 1.14 did not have this problem.
here is the peace of code :
oddbblocktableptr pextblocktblptr = pdb->getblocktableid().safeopenobject();
oddbsymboltableiteratorptr pblkiter = pextblocktblptr->newiterator();
for(pblkiter->start(); !pblkiter->done(); pblkiter->step())
{
oddbblocktablerecordptr pblock = pblkiter->getrecordid().safeopenobject();
if(pblock->isfromexternalreference())
{
oddbxrefman::load(pblock);
oddbxrefman::bind(pblock,1); //no unique names
}
}
is there a way avoid this layer duplicating?


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