admin 发表于 2024-5-2 22:40:59

ARX 批量删除对象

static void EraseIds(AcDbObjectIdArray idArr)
{
if(idArr == NULL || idArr.length() == 0)
{
return;
}
for(int i = 0;i < idArr.length(); i++)
{
AcDbEntity* pDel = NULL;
if(Acad::eOk != acdbOpenObject(pDel,idArr.at(i),AcDb::OpenMode::kForWrite))
{
continue;
}
if(Acad::eOk != pDel->erase())
{
acutPrintf(采用T("\n删除第%d个实体失败"),i);
}
pDel->close();
}
}
页: [1]
查看完整版本: ARX 批量删除对象