这是好的解决方案吗
- (defun c:frerror (/ CNT EN ENPNT INSPNT SSETF)
- (if (and
- (setq
- ssetf (ssget "X" (list (cons 0 "*TEXT") (cons 1 "*[####]*")))
- )
- (setq inspnt (getpoint "\nPick point"))
- (setq cnt 0)
- )
- (progn
- (repeat (sslength ssetf)
- (setq en (ssname ssetf cnt))
- (setq enpnt (assoc 10 (entget en)))
- (setq enpnt (list (nth 1 enpnt) (nth 2 enpnt) (nth 3 enpnt)))
- (command "_.LINE" inspnt enpnt "")
- (setq cnt (1+ cnt))
- )
- )
- )
- )
|