![]() |
[lisp&arx]写一个给lisp取点表用的arx
[lisp&arx]写一个给lisp取点表用的arx
www.dimcax.com [lisp&arx]写一个给lisp取点表用的arx ( ( pts(getgrippointlist ename)radius 0.1) ( pt pts ( ( '((0 . "circle") (100 . "acdbentity")(100 . "acdbcircle") (8 . "0")) ( ( 40 radius)( 10 pt)))) ( radius( radius 0.1)) ) ) ) 通过工具菜单->加载应用程序 可加载该程序,然后可直接在命令行输入相关命令运行。如需要每次启动时均加载该程序,则可以将该文件放在启动组中。 因為專業, 所以精彩! 多多學習.多多進步 . 明经在我在! 我的代表作/bbs/dispbbs.asp?boardid=2&id=33961 /bbs/dispbbs.asp?boardid=14&id=58568&page=1 d arx 部份的代码如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40// ----- ads_getgrippointlist command static int ads_getgrippointlist(void) { //----- remove the following line if you do not expect any argument for this ads function struct resbuf *pargs =acedgetargs (); struct resbuf *rbstart=acutbuildlist(rtlb,rtnone),*rb=rbstart; ads_point pt1; acgepoint3d spt; // todo: add your code here long sslen; ads_real len,allen; ads_name ss,ename; acdbobjectid objid; acdbentity *pent; acgepoint3darray ptlist; acdbintarray osnapmodes,geomids; allen=0; if (pargs->restype==rtename){//pargs->restype!=rtename|| ads_name_set(pargs->resval.rlname,ename); acdbgetobjectid(objid,ename); if(acdbopenobject(pent, objid, acdb::kforread)!=acad::eok)return false; if(pent->iskindof(acdbcurve::desc())){ acdbcurve *cur=(acdbcurve*)pent;//类型转换 //cur->getstretchpoints(ptlist); cur->getgrippoints(ptlist,osnapmodes,geomids); } pent->close(); int len=ptlist.length(); for (int i=0;len>i; i++) { spt=ptlist.at(i); ads_point_set(asdblarray(spt),pt1); rb->rbnext=acutbuildlist(rt3dpoint,pt1/*asdblarray(pts[i])*/,rtnone); rb = rb->rbnext; } rb->rbnext = acutbuildlist(rtle,rtnone); acedretlist(rbstart); } // todo: replace the following line by your returned value if any return (rsrslt) ; } 因為專業, 所以精彩! 多多學習.多多進步 . 明经在我在! 我的代表作/bbs/dispbbs.asp?boardid=2&id=33961 /bbs/dispbbs.asp?boardid=14&id=58568&page=1 d 支持楼主,要是能写个可以接受关键字的ssget或写个支持动态拖拉选集的getpoint就更好了. d 下了 但加载不了该程序! d |
所有的时间均为北京时间。 现在的时间是 04:30 PM. |