子实体路径 AcDbFullSubentPath

2018-04-12  本文已影响0人  王姚
class AcDbFullSubentPath
{
    AcDbObjectIdArray mObjectIds;
    AcDbSubentId      mSubentId;
}
class AcDbSubentId
{
    AcDb::SubentType mType;
    Adesk::GsMarker  mIndex;
}

AcDb::SubentType

AcDb::kNullSubentType
AcDb::kFaceSubentType
AcDb::kEdgeSubentType
AcDb::kVertexSubentType

运用实例

// 选择立方体
ads_name ename = { 0 };
ads_point selPnt = { 0 };
acedEntSel(_T("请选择立方体"), ename, selPnt);
AcDbObjectId oid = AcDbObjectId::kNull;
acdbGetObjectId(oid, ename);

AcDbEntity* pEnt = NULL;
acdbOpenObject(pEnt, oid, AcDb::kForRead);

// 高亮显示立方体的6个面
for (int i = 0; i < 6; ++i)
{
    AcDbFullSubentPath subPath;
    subPath.objectIds().removeAll();
    subPath.subentId() = AcDbSubentId(AcDb::kFaceSubentType, i);
    pEnt->highlight(subPath);
}

pEnt->close();
上一篇 下一篇

猜你喜欢

热点阅读