AcDbObjectId PostToModelSpace(AcDbEntity *pEnt) { //定义块表 AcDbBlockTable *pBlk; acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlk,AcDb::kForRead); //定义块表记录 AcDbBlockTableRecord *pBlkTblRcd; pBlk->getAt(ACDB_MODEL_SPACE,pBlkTblRcd,AcDb::kForWrite); pBlk->close(); //定义ID AcDbObjectId id; pBlkTblRcd->appendAcDbEntity(id,pEnt); pEnt->close(); return id; }
ObjectARX2010 学习笔记003:增加实体到数据库,布布扣,bubuko.com
ObjectARX2010 学习笔记003:增加实体到数据库
原文地址:http://www.cnblogs.com/swtool/p/3815771.html