|
static AcDbObjectId LoadEntity(AcDbEntity* entity)
{
AcDbBlockTable* pBlockTable;
acdbHostApplicationServices()->workingDatabase()->getBlockTable(pBlockTable,AcDb::kForRead);
AcDbBlockTableRecord* pBlockTableRecord;
pBlockTable->getAt(ACDB_MODEL_SPACE,pBlockTableRecord,AcDb::kForWrite);
AcDbObjectId Id;
pBlockTableRecord->appendAcDbEntity(Id,entity);
pBlockTable->close();
pBlockTableRecord->close();
entity->close();
return Id;
} |
|