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
时间: 2024-10-12 17:55:31