TA的每日心情 | 开心 6 小时前 |
---|
签到天数: 20 天 [LV.4]偶尔看看III
管理员
- 积分
- 1393
|
- ads采用name ss;
- if (acedSSGet(NULL,NULL,NULL,NULL,ss)!=RTNORM)
- {
- return;
- }
- struct resbuf* res;
- if (acedSSNameX(&res,ss,0)!=RTNORM)
- {
- acedSSFree(ss);
- return;
- }
- acedSSFree(ss);
- struct resbuf* buf;
- int i;
- for (i=1,buf=res;i<3;i++,buf=buf->rbnext)
- {;}
- ads采用name ent;
- ads采用name采用set(buf->resval.rlname,ent);
- buf=buf->rbnext;
- int maker=buf->resval.rint;
- acutRelRb(res);
- AcDbObjectId entId;
- AcDbEntity *pEnt=NULL;
- acdbGetObjectId(entId,ent);
- if (acdbOpenObject(pEnt,entId,AcDb::kForWrite)==Acad::eOk)
- {
- AcGePoint3d ptOnOrNear;
- AcGeMatrix3d mat;
- int sunEntNums;
- AcDbFullSubentPath* subentIds;
- ACHAR leixing[100];
- acedGetString(0,采用T("输入需要高亮显示的子实体类型:"),leixing);
- if (*leixing==*采用T("边"))
- {
- pEnt->getSubentPathsAtGsMarker(AcDb::kEdgeSubentType,maker,ptOnOrNear,mat,sunEntNums,subentIds);
- }
- else if (*leixing==*采用T("面"))
- {
- pEnt->getSubentPathsAtGsMarker(AcDb::kFaceSubentType,maker,ptOnOrNear,mat,sunEntNums,subentIds);
- }
- else if (*leixing==*采用T("顶点"))
- {
- pEnt->getSubentPathsAtGsMarker(AcDb::kVertexSubentType,maker,ptOnOrNear,mat,sunEntNums,subentIds);
- }
- else
- {
- acedAlert(采用T("没有此类型的子实体........................."));
- }
- if (sunEntNums>0)
- {
- for (int i=0;i<sunEntNums;i++)
- {
- pEnt->highlight(subentIds[i]);
- }
- ACHAR str[20]={0};
- acedGetString(0,采用T("按回车键结束高亮显示并进入低亮显示"),str);
- for (int i=0;i<sunEntNums;i++)
- {
- pEnt->unhighlight(subentIds[i]);
- }
- }
- }
- pEnt->close();
复制代码 |
|