Well, that was my previous question about......
(vl-load-com)
(defun c:nobiscumv11 ( / *error* s e i a b c p l f n)
(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
(princ (strcat "\nError: " errmsg)))
(if f (close f))
(princ))
(if (and (setq s (ssget '((0 . "ARC,LINE"))))
(setq n (1- (cond ((getint "Initial number <1>: ")) (1))))
(setq f (open (strcat (getvar 'DWGPREFIX) (vl-string-right-trim ".dwg" (getvar 'DWGNAME)) "-Coord.csv") "w"))
(write-line "NAZIV;E(HTRS);N(HTRS);Z" f) ; heading
)
(repeat (setq i (sslength s))
(setq e (ssname s (setq i (1- i)))
a (vlax-curve-getstartpoint e)
b (vlax-curve-getendpoint e)
c (if (= "ARC" (cdr (assoc 0 (entget e))))
(vlax-curve-getpointatdist e (/ (vlax-curve-getdistatparam e (vlax-curve-getendparam e)) 2))))
(foreach p (list a c b)
(if (and p (not (vl-remove-if-not '(lambda (x) (equal p x 1e-5)) l)))
(setq l (cons p l))))))
(foreach p l
(entmake (list '(0 . "POINT") (cons 10 p)))
(entmake (list '(0 . "TEXT") (cons 10 (mapcar '+ p '(0.2 0.2 0))) '(40 . 1.25) (cons 1 (itoa (setq n (1+ n))))))
(write-line (strcat (itoa n) ";"
(vl-string-translate "." "," (rtos (car p) 2 2)) ";"
(vl-string-translate "." "," (rtos (cadr p) 2 2)) ";"
(vl-string-translate "." "," (rtos (caddr p) 2 2))) f))
(*error* "end")
)