;;; Kreis wird gelöscht! ;;; ;;;Holger Brischke ;;;Geisberg 84 ;;;66132 Saarbrücken ;;;brischke@planet-interkom.de ;;; (defun c:k2p (/ li obj mpt ra) (if (setq obj (f:select (list "CIRCLE"))) (setq li (entget obj)) ) ;_ end of if (if li (progn (setq mpt (cdr (assoc 10 li)) ra (cdr (assoc 40 li)) ) ;_ end of setq (entmake (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 (cdr (assoc 8 li))) '(100 . "AcDbPolyline") '(90 . 2) '(70 . 1) '(43 . 0.0) '(38 . 0.0) '(39 . 0.0) (cons 10 (list (+ (car mpt) ra) (cadr mpt))) '(40 . 0.0) '(41 . 0.0) '(42 . 1.0) (cons 10 (list (- (car mpt) ra) (cadr mpt))) '(40 . 0.0) '(41 . 0.0) '(42 . 1.0) '(210 0.0 0.0 1.0) ) ;_ end of list ) ;_ end of entmake (entdel (cdr(assoc -1 li))) (princ "\nOk!") ) ;_ end of progn ) ;_ end of if (princ) ) ;_ end of defun (defun f:select (sel_objli / sel_el tmp sel_el_etyp) (while (not sel_el) (setq tmp (entsel (strcat "\nWähle " (apply 'strcat (mapcar '(lambda (TXT) (strcat TXT "/ ") ) ;_ end of lambda sel_objli ) ;_ end of mapcar ) ;_ end of apply ) ;_ end of strcat ) ;_ end of entsel ) ;_ end of setq (if tmp (progn (setq sel_el (car tmp) sel_el_etyp (cdr (assoc 0 (entget sel_el))) ) ;_ end of setq (if (not (member sel_el_etyp sel_objli) ) ;_ end of not (progn (princ (strcat "\ndas war kein " (car sel_objli))) (setq sel_el nil) ) ) ;_ end of if ) ;_ end of progn (setq sel_el T) ) ;_ end of if ) ;while (if (= (type sel_el) 'ENAME) sel_el ) ;_ end of if ) ;_ end of defun