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