|
Acad::ErrorStatus PostToModelSpace(AcDbEntity* ent)
{
AcDbObjectId objId;
return CMDatabase::PostToModelSpace(ent, objId);
}
Acad::ErrorStatus PostToModelSpace(AcDbEntity* ent, AcDbObjectId& objId)
{
Acad::ErrorStatus es;
AcDbBlockTable* pBlockTable;
AcDbBlockTableRecord* pSpaceRecord;
if ((es = acdbHostApplicationServices()->workingDatabase()->
getSymbolTable(pBlockTable, AcDb::kForRead))
!= Acad::eOk) {
return es;
}
if ((es = pBlockTable->getAt(ACDB_MODEL_SPACE,
pSpaceRecord,
AcDb::kForWrite)) != Acad::eOk) {
return es;
}
if ((es = pBlockTable->close()) != Acad::eOk) {
return es;
}
if ((es = pSpaceRecord->appendAcDbEntity(objId, ent)) != Acad::eOk) {
return es;
}
if ((es = pSpaceRecord->close()) != Acad::eOk) {
return es;
}
return ent->close();
}
Acad::ErrorStatus PostToModelSpace(AcDbEntity* ent)
{
AcDbObjectId objId;
return CMDatabase::PostToModelSpace(ent, objId);
}
Acad::ErrorStatus PostToModelSpace(AcDbEntity* ent, AcDbObjectId& objId)
{
Acad::ErrorStatus es;
AcDbBlockTable* pBlockTable;
AcDbBlockTableRecord* pSpaceRecord;
if ((es = acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlockTable, AcDb::kForRead)) != Acad::eOk)
{
return es;
}
if ((es = pBlockTable->getAt(ACDB_MODEL_SPACE,
pSpaceRecord,
AcDb::kForWrite)) != Acad::eOk) {
return es;
}
if ((es = pBlockTable->close()) != Acad::eOk) {
return es;
}
if ((es = pSpaceRecord->appendAcDbEntity(objId, ent)) != Acad::eOk) {
return es;
}
return pSpaceRecord->close();
} |
|