|
- void MoveAllEntitiesInGroup(const AcDbGroup *pMyGroup, AcGeVector3d vOffset) {
- Acad::ErrorStatus es;
- AcDbObjectIdArray ids;
- pMyGroup->allEntityIds(ids);
- AcDbEntity *pEnt;
- AcGeMatrix3d mat;
- mat.setToTranslation(vOffset);
- for (const AcDbObjectId &id : ids) {
- if ( (es=acdbOpenObject(pEnt, id, AcDb::kForWrite)) == Acad::eOk ) {
- es = pEnt->transformBy(mat);
- pEnt->close();
- }
- }
- }
复制代码 |
|