![]() |
【转帖】[请教]在arx上acdbentget 取到的dxf组码没有颜色62的, 要怎么加上这62颜色组码呀?
[请教]在arx上acdbentget 取到的dxf组码没有颜色62的, 要怎么加上这62颜色组码呀?
[请教]在arx上acdbentget 取到的dxf组码没有颜色62的, 要怎么加上这62颜色组码呀? 因为在cad里面对象的颜色如果是随层,dxf组码里面就没有记录该对象颜色的组码,请问在arx里面怎么加上呀? 我的测试代码如下: 还望各位朋友在百忙中抽点时间指点下,谢谢 static int ads_modlast(void) { //----- remove the following line if you do not expect any argument for this ads function struct resbuf *pargs =acedgetargs () ,*ed,*cb; // todo: add your code here int a=0; ads_name en; acdbentlast(en); ed= acdbentget(en); for(cb=ed;cb!=null;cb=cb->rbnext) { if(cb->restype== 62) { cb->resval.rint=1;//我想把对象改为红色 if(acdbentmod(ed)!=rtnorm) { acutrelrb(ed); return 0; } a=1; break;//处理好就跳出循环,节省时间。 } } if(a==0)//这个变量告诉我该对象的颜色随层,dxf里面没有颜色的组面要加上去, //但是我加的不对,要怎么做才对呢?请教各位朋友. { ed->restype=62; ed->resval.rint=1; acdbentmod(ed); } acutprintf("\n变量a的值为<%d>;",a); acutrelrb(ed); // todo: replace the following line by your returned value if any acedretvoid () ; return (rsrslt) ; } 用acutnewrb和acedentmod |
所有的时间均为北京时间。 现在的时间是 12:48 PM. |