|
发表于 2004-11-16 13:23:00
|
显示全部楼层
好像不能达到我要的效果。
我已经找到了好的办法解决这个问题
ads_name SS;
void MYSEL(const char * str)
{
ads_name SS2;
ads_point Pt;
struct resbuf* B1;
struct resbuf B3;
struct resbuf B4;
struct resbuf B2;
int track=15;
int type=2;
long I;
int KK;
ads_point Pt2;
if(acedSSGet("I",NULL,NULL,NULL,SS)!=RTNORM)
{
KK=acedEntSel(str,SS2,Pt);
if (KK!=RTNORM)
{
if (acedGrRead(track,&type,&B2)!=RTNORM)return;
if (type==13)
{
if (acedGrRead(track,&type,&B2)!=RTNORM)return;
}
if (type==12)return;
B1=&B2;
for (I=0;&B1!=NULL;B1=B1->rbnext)
{
if(B1->restype==RT3DPOINT)
{
Pt[X]=B1->resval.rpoint[X];
Pt[Y]=B1->resval.rpoint[Y];
Pt[Z]=B1->resval.rpoint[Z];
break;
}
}
acedGetVar("OSMODE",&B3);
B4.restype = RTLONG;
B4.resval.rstring = 0;
B4.rbnext = NULL;
acedSetVar("OSMODE",&B4);
acedInitGet(32,NULL);
if(acedGetCorner(Pt,"\n指定对角点:",Pt2)!=RTNORM)
{
acedSetVar("OSMODE",&B3);
goto LINE1;
}
if(acedSSGet("C",Pt,Pt2,NULL,SS)!=RTNORM)
{
acedSetVar("OSMODE",&B3);
goto LINE1;
}
acedSetVar("OSMODE",&B3);
}
else
{
if(acedSSAdd(SS2,NULL,SS)!=RTNORM)goto LINE1;
}
}
LINE1:
acedSSFree(SS2);
return;
} |
|