增加AUTOCAD在文字處理上的功能
(作者未知) 2009/7/19
(接上頁(yè))nc"\n")(princ"選取文字(自動(dòng)濾去非文字實(shí)體):")(princ)
(while(﹤i10000)
(setqss(ssget))
(setqn(sslengthss))
(setqindex0)
(repeatn
(setqent0(entget(ssnamessindex)))
(if(=(cdr(assoc72ent0))0)
(progn
(setqa410)
(if(/=a10)(setqa511)(setqa510))
)
)
(setqindex(+1index))
(setqtype(assoc0ent0))
(if(="TEXT"(cdrtype))
(progn
(setqp0(assoc72ent0))
(setqp(cons(carp0)a1))
(setqpp(substpp0ent0))
(setqold(assoc11pp))
(if(=a"L")
(setqa3(list00))
(setqa3(cdr(assoc11pp)))
)
(setqnew(cons(carold)a3))
(setqent(substnewoldpp))
(setqo1(cadr(cdr(assoca4ent0))))
(setqo2(car(cdr(assoca4ent0))))
(if(=txsizenil)
(progn
(setqa6(entget(ssnamess0)))
(setqa6(cdr(assoca4a6)))
(setqo3(cara6)o4(cadra6))
)
(setqo3(cartxsize)o4(cadrtxsize))
)
(setqoldsize(assoca5ent0))
(if(and(/=bnil)(/=b2))
(setqaao2bbo4cc(caroldize))
(setqaao3bbo1cc(cdroldsize))
)
(setqnewsize(cons(caroldsize)(listaabb)))
(setqent1(substnewsizeoldsizeent))
(entmodent1)
)
)
)
)
(prin1)
)
;--------------------
2.多文字的間距調(diào)整
editdate:1995.6.1
(defunc:zdjt(/newoldentent1indexssss1s2cjsjnxxsyyswbwgwcwg0wg1zbtypefsijbbbbj1bj2aj1aj2cj1cj2$a$c$bss1ss2dj1dj2zxej1ej2fj1fj2zkjd)
(setvar"cmdecho"0)
;(princ"\n1.order:fromtoptobutton.fromlefttoright")
;(princ"\n2.thereisoveraentity")(princ)
(princ"\n間距調(diào)整方式選擇如下:")(princ)
(setqsjnilcjnil)
(setqs1(getint"\n1.水平2.垂直3.斜向﹤1﹥:"))
(if(/=s13)
(progn
(if(=s1nil)(setqs11))
(if(=s11)(setqsj(getdist"\n輸入文字水平間距值(或用鼠標(biāo)點(diǎn)取):"))
(setqcj(getdist"\n輸入文字垂直間距值(或用鼠標(biāo)點(diǎn)取):")))
(setqfs(strcase(getstring"\n選擇對(duì)齊方式(C中心/L左側(cè)/R右側(cè)/M中點(diǎn))﹤L﹥:")))(未完,下一頁(yè))
|