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();
网友评论