(setq sh (sslength e))
(if e
(while (< n sh)
(setq e1 (ssname e n))
(command "pedit" e1 "d" "")
(setq x (entget e1))
(setq ngc (atof (setq la (fld 8 x))))
(command "explode" e1)
(setq n (+ n 1))
) ) )
(defun fld (num lst)
(cdr (assoc num lst))
)
(defun c:spltol ()
;SPLINE转化为LINE
(setq n 0)
(setq e (ssget "X" (list (cons 0 "SPLINE"))))
(setq sh (sslength e))
(if e
(while (< n sh)
(setq x (entget (setq e1 (ssname e n))))
(setq nla (itoa (fix (caddr (fld 10 x)))))
(if (= (fld 0 x) "SPLINE")
(progn
(command "layer" "n" nla "c"
"6" nla "s" nla "")
(command"line")
(setq nm (length x)
dzs (fld 73 x) dzs1 (fld 74 x))
(while (> nm 5)
(if (= (car (nth nm x)) 10)
(progn
&n