admin 发表于 2024-5-2 22:47:24

OBJECT ARX //加载一个实体到数据库,返回实体ID

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;
}
页: [1]
查看完整版本: OBJECT ARX //加载一个实体到数据库,返回实体ID