 - (defun c:tt (/ _listFromfile fl lst radius p)
- (defun _listFromfile (fl / f l ll)
- (if (setq f (open (findfile fn) "r"))
- (progn
- (while (setq l (read-line f))
- (setq ll (cons l ll))
- )
- (close f)
- )
- )
- (reverse ll)
- )
- (if (setq fl (getfiled "select txt" "d://" "txt" 8))
- (progn
- (setq lst (_listFromfile fl))
- (while lst
- (if (wcmatch (car lst) "*D*")
- (setq radius
- (distof (substr (car lst)
- (+ 2 (vl-string-search "D" (car lst)))
- )
- )
- )
- (progn
- (setq p
- (read (strcat "("
- (vl-string-translate "XY" " " (car lst))
- ")"
- )
- )
- )
- (entmake (list '(0 . "circle")
- (cons 10 p)
- (cons 40 radius)
- )
- )
- )
- )
- (setq lst (cdr lst))
- )
- )
- )
- (princ)
- )
|