增加AUTOCAD在文字處理上的功能
(作者未知) 2009/7/19
(接上頁)
(if(=fs"M")(progn
(command"osnap""nea")
(setqss1(getpoint"\n文字起點(diǎn):"))
(setqss2(getcornerss1"\n文字終點(diǎn):"))
(setqs2(polarss1(angless1ss2)(/(distancess1ss2)2)))
(command"osnap""none")
)
(setqs2(getpoint"\n這組文字起點(diǎn)textlocationpoint:"))
)
(setqx(cars2)y(cadrs2))
(princ"\n按先后次序選取文字")(princ)
(setqss(ssget))
(setqn(sslengthss)index0i0j0)
(repeatn
(setqent(entget(ssnamessindex)))
(if(="TEXT"(cdr(assoc0ent)))
(progn
(setqi(+i1))
(if(=s11)
(setqzb(car(CDR(assoc10(entget(ssnamessindex))))))
(setqzb(CADR(cdr(assoc10(entget(ssnamessindex))))))
)
(setqwb(cdr(assoc1(entget(ssnamessindex))))
wg(cdr(assoc40(entget(ssnamessindex))))
zk(cdr(assoc41(entget(ssnamessindex))))
jd(cdr(assoc50(entget(ssnamessindex))))
zx(cdr(assoc7(entget(ssnamessindex))))
)
(set(read(strcat"b"(itoai)))zb);coordinate
(set(read(strcat"a"(itoai)))wb);word
(set(read(strcat"c"(itoai)))wg);hight
(set(read(strcat"d"(itoai)))zx);wordstyle
(set(read(strcat"e"(itoai)))zk);wordwide
(set(read(strcat"f"(itoai)))jd);wordengle
(setqnew(cons(car(assoc1ent))""))
(setqent1(substnew(assoc1ent)ent))
(entmodent1)
)
)
(setqindex(+index1))
)
(setqni)
(while(﹥=n2)
(setqj1)
(while(﹤=j(-n1))
(setqbj1(eval(read(strcat"b"(itoaj)))))
(setqbj2(eval(read(strcat"b"(itoa(+j1))))))
(setqaj1(eval(read(strcat"a"(itoaj)))))
(setqaj2(eval(read(strcat"a"(itoa(+j1))))))
(setqcj1(eval(read(strcat"c"(itoaj)))))
(setqcj2(eval(read(strcat"c"(itoa(+j1))))))
(setqdj1(eval(read(strcat"d"(itoaj)))))
(setqdj2(eva(未完,下一頁)
|