- UID
- 289007
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2005-7-6
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
AcDbBlockTable *pThisBlockTable;
acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pThisBlockTable,
AcDb::kForWrite);
AcDbBlockTableRecord *pOtherBtr;
pThisBlockTable->getAt(ACDB_MODEL_SPACE,pOtherBtr,AcDb::kForWrite);
pThisBlockTable->close();
AcDbBlockTableRecordIterator *pOIter;
pOtherBtr->newIterator(pOIter);
AcDbObjectIdArray objIdArray;
for(pOIter->start();!pOIter->done();pOIter->step())
{
AcDbEntity *ent;
pOIter->getEntity(ent,AcDb::kForRead);
if(ent->colorIndex()==100||ent->colorIndex()==200)
objIdArray.append(ent->objectId());
ent->close();
}
delete pOIter;
pOtherBtr->close();
AcDbBlockTableRecord *pBTableRec=new AcDbBlockTableRecord();
pBTableRec->setName("ASDK_NEW");
AcDbObjectId blockId;
AcDbIdMapping iMap;
AcDbBlockTable *pBtable=NULL;
pBtable->add(pBTableRec);
pBtable->getAt("ASDK_NEW",blockId);
pBtable->close();
acdbHostApplicationServices()->workingDatabase()->deepCloneObjects(objIdArray,blockId,iMap);
我想把当前块表中颜色索引为100和200的实体拷贝到另外一个块表中,怎么运行到pBtable->add(pBTableRec);根pBtable->getAt("ASDK_NEW",blockId);这里的时候就出现问题,这个应该怎么改啊? |
|