here is a little lisp routine to convert ellipses to lwpolylines, this also does elliptical arcs but it converts them to there full elliptical state and cannot figure out how to trim it back to the arc it was. but this does do ellipses.
The Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; AutoLisp Program ;;
;; PROGRAM: existing ellipses to Plines.lsp ;;
;; DATE: 4-19-06 ;;
;; File Location: C:\Program Files\Trane Company\Data Maintenance\SM ;;
;; BY: Jeremy Preston ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun e2p( /
old new ;existent and new polyline
sav ;store system variables
cen ;center of ellipse
dep ;axis end point deplacement (relative to cen)
p1 p2 ;first axis enpoints
p3 ;sec. axis endpoint
ellObjs ; added
numObjs ; added
count ; added
)
(setq ellObjs (ssget "x" '((0 . "ELLIPSE"))))
(if ellObjs
(progn
(setq numOjbs (sslength ellObjs)
count 0
)
(while (> numOjbs count)
(setq old (cdr (assoc -1 (entget (ssname ellObjs count)))))
(setq sav (mapcar 'getvar '("PELLIPSE" "OSMODE" "UCSICON"))
cen (cdr (assoc 10 (entget old)))
dep (cdr (assoc 11 (entget old))))
(mapcar 'setvar '("PELLIPSE" "OSMODE" "UCSICON") '(1 0 0))
(command "UCS" "e" old)
(setq p1 (trans (list (+ (car cen) (car dep))
(+ (cadr cen) (cadr dep))
(+ (caddr cen) (caddr dep)))
0 1)
p2 (trans (list (- (car cen) (car dep))
(- (cadr cen) (cadr dep))
(- (caddr cen) (caddr dep)))
0 1)
p3 (trans (polar cen
(+ (/ PI 2.0) (angle p1 p2))
(* 0.5 (cdr (assoc 40 (entget old))) (distance p1 p2)))
0 1)
)
(command "ellipse" p1 p2 p3)
(command "_.chprop" old "" "la" "0" "")
(setq new (entget (entlast))
new (subst (cons 8 (cdr (assoc 8 (entget old)))) (assoc 8 new) new))
(entmod new)
(entdel old)
(command "ucs" "p")
(mapcar 'setvar '("PELLIPSE" "OSMODE" "UCSICON") sav)
(setq count (1+ count))
); while
); progn
); if
(princ)
);; end of program
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun 2d2lw()
(prompt "\nChanging LW to 2D\n ")
(setq count 0)
(if(setq sset (ssget "X" ' ((0 . "POLYLINE"))))
(command "convertpoly" "L" sset"")
);; end of if
);; end of program
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun 2d()
(e2p)
(2d2lw)
);; end of program
(alert "Program automatically starts when you press ok")
(2d)