arx 查找块表添加实体公用代码
//查找表
AcDbBlockTable *pBlockTable;
acdbHostApplicationServices()->workingDatabase()->getBlockTable(pBlockTable,AcDb::kForRead);
//查找记录
AcDbBlockTableRecord *pBlockTableRecord;
pBlockTable->getAt(ACDB_MODEL_SPACE,pBlockTableRecord,AcDb::kForWrite);
//添加实体
AcDbObjectId lineld;
pBlockTableRecord->appendAcDbEntity(lineld,ptLine);
评论
发表评论