TA的每日心情 | 开心 9 小时前 |
---|
签到天数: 18 天 [LV.4]偶尔看看III
管理员
- 积分
- 1369
|
楼主 |
发表于 2024-2-23 22:14:07
|
显示全部楼层
- ads采用name entName;
- ads采用point entpoint;
- if (acedEntSel(采用T("\nlayer:"),entName,entpoint)!=RTNORM)
- {
- return;
- }
- AcDbObjectId layerId;
- acdbGetObjectId(layerId,entName);
- AcDbEntity *pEnt;
- acdbOpenObject(pEnt,layerId,AcDb::kForWrite);
- TCHAR *layerName=pEnt->layer();
- pEnt->close();
- struct resbuf *rb;
- ads采用name ssname;
- rb=acutBuildList(8,layerName,RTNONE);
- int rc=acedSSGet(采用T("X"),NULL,NULL,rb,ssname);
- AcDbObjectIdArray objIds;
- if (rc!=RTNORM)
- {
- acutRelRb(rb);
- return;
- }
- long length;
- acedSSLength(ssname,&length);
- acutPrintf(采用T("\nlayer%sall%d个"),layerName,length);
- for (int i=0;i<length;i++)
- {
- ads采用name ent;
- acedSSName(ssname,i,ent);
- AcDbObjectId objId;
- acdbGetObjectId(objId,ent);
- objIds.append(objId);
- }
- changeDrawOrder(NULL,objIds,kDrawOrderTop);
- //acedDrawOrderInherit(NULL,objIds,::kDrawOrderTop);
- acedSSFree(ssname);
- acutDelString(layerName);
- if (rb!=NULL)
- {
- acutRelRb(rb);
- }
复制代码 |
|