如果我理解正确,作为起点:
- (defun c:demo (/ A ANG B C D S)
- (if (setq c (getpoint "\nEnter the line startpoint: "))
- (while (and (princ "\nSelect the text with the direction: ")
- (setq a (ssget "_+.:E:S" '((0 . "TEXT,MTEXT"))))
- (princ "\nSelect the text with the distance: ")
- (setq b (ssget "_+.:E:S" '((0 . "TEXT,MTEXT"))))
- )
- (if (and (setq s (strcase (cdr (assoc 1 (entget (ssname a 0))))))
- (setq ang (angtof (strcat (substr (vl-string-subst "d" "%%D" s) 1 (- (strlen s) 1)))
- 3
- )
- )
- )
- (if (setq d (atof (cdr (assoc 1 (entget (ssname b 0))))))
- (entmake (list (cons 0 "LINE")
- (cons 10 c)
- (cons 11
- (setq c (polar c ang d))
- )
- )
- )
- )
- )
- )
- )
- (princ)
- )
希望有帮助
亨里克 |