AcDbGroup 添加新成员,以及往组里面添加实体
AcDbGroup *pGroup = new AcDbGroup;AcDbObjectIdgroupObjectId;
AcDbDictionary*pGroupDict = NULL;
acdbCurDwg()->getGroupDictionary(pGroupDict, AcDb::kForWrite);
pGroupDict->setAt("GroupName", pGroup, groupObjectId);//在AcdbGroup词典里面添加一项名为GroupName
pGroupDict->close();
//如果想实体添加到组里面 将打开的实体ID传入 组里面就行了
pGroup->append(objectId1); // objectId1 and objectId2
// are objId's of the
pGroup->append(objectId2); // entities which will be in the group.
pGroup->close();
页:
[1]