很好,hmsilva先生,我认为你对OP的要求有正确的方向
起初我以为OP想在pasteclip中收集插入的文本,直到你通过“重画”解决了这个问题。非常感谢。
谢谢你的指导,但是我会尽量减少在没有ssget的情况下点击[Enter]。
- (defun c:test (/ p au l) ;
- ;hanhphuc 10/01/2014
- (setq p (getpoint "\nNew base point..")
- au (mapcar 'getvar '("angbase" "angdir" "aunits"))
- ) ;_ end of setq
- (mapcar 'setvar [color="red"] '("angbase" "angdir" "aunits") [/color] (list (* pi 0.5) 1 1)) ; edit: v1.1
- (while (and p
- (vl-every ''((ss) (and ss (atof ss)))
- (setq l (mapcar ''((x)
- (if
- x
- (cdr (assoc 1 (entget (car x))))
- )
- )
- (list (entsel "\nPick Bearing text: ") (entsel "\nPick Distance text: "))
- ) ;_ end of mapcar
- ) ;_ end of mapcar
- ) ;_ end of vl-every
- (wcmatch (car l) "*%%*")
- (not (zerop (atof (cadr l))))
- (setq l (vl-list*
- (subst ('((%) (vl-string-subst (chr 176) (substr % (1+ (vl-string-search "%" %)) 3) %)) (car l))
- (car l)
- l
- ) ;_ end of subst
- ) ;_ end of vl-list*
- ) ;_ end of setq
- ) ;_ end of and
- (entmakex
- (list '(0 . "LINE")
- (cons 10 p)
- (cons 11 (setq p (apply 'polar (vl-list* p (list (angtof (car l) 1) (atof (cadr l)))))))
- ) ;_ end of list
- ) ;_ end of entmake
- ) ;_ end of defun
- (mapcar 'setvar '("angbase" "angdir" "aunits") au)
- (princ)
- ) ;_ end of defun
|