//遍历当前DWG中的铜管
BOOL CMainDlg::traverDBCopperConduit()
{
Acad::ErrorStatus es;
AcApDocument *pDoc=acDocManager->curDocument();//锁定文档
es=acDocManager->lockDocument(pDoc);
if(es!=Acad::eOk)
{
acutPrintf("锁定文档失败");
return es;
}
//数据库变量
AcTransaction *trans;
AcDbDatabase *pCurDb;
AcDbBlockTable *pBlkTable;
AcDbBlockTableRecord *pBlkTableRecord;
AcDbObjectId objectId,blkTblRecordId;
AcDbObject *entity;
AcDbBlockTableRecord *blockTableRec;
char *cName;
//
//事务开始
trans = actrTransactionManager->startTransaction();
if(trans==NULL)
{
acutPrintf("/n启动事务失败!");
return Acad::eTransactionOpenWhileCommandEnded;
}
try{