ObjectARX学习笔记(十二)—-AcDbGroup 添加新成员,以及往组里面添加实体

作者: admin 分类: C++,CAD,ObjectARX 发布时间: 2020-08-01 21:19
AcDbGroup *pGroup = new AcDbGroup;
AcDbObjectId  groupObjectId;
AcDbDictionary  *pGroupDict = NULL;
acdbCurDwg()->getGroupDictionary(pGroupDict, AcDb::kForWrite);
pGroupDict->setAt("GroupName", pGroup, groupObjectId);//在AcdbGroup词典里面添加一项名为GroupNamepGroupDict->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();

ObjectARX学习笔记(十三)—-如何高亮显示AcDbGroup中的单个实体,或者全部高亮显示

AcDbGroup::setSelectable

Collapse All

C++

Acad::ErrorStatus setSelectable(

    bool selectable

);

Parameters

Parameters

Description

bool selectable

Input boolean to indicate the selectable state.

Description

If selectable == true, then the entire group is selected and manipulated as one unit. selectable == false allows users to manipulate individual entities within the group.

Returns Acad::eOk if successful. 

将此函数设置true将高亮显示组中所有实体,将此函数设置为false将高亮显示组中的单个实体

如果觉得我的文章对您有用,请随意赞赏。您的支持将鼓励我继续创作!

发表评论

标签云