You have to get all AcDbEntitys within the AcDbGroup and move them individually. The most effective way is to do it like this:
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();
}
}
}
If you insist on using a resbuf list you can use
Acad::ErrorStatus acdbGetAdsName(ads_name& objName, AcDbObjectId objId);
to get the ads_names. of the AcDbObjectIds within ids. Than you can and either append them to the resbuf list or build a selectionset.
Thomas Brammer ● Software Developer ● imos AG ● LinkedIn ●
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.