(defun massoc (key alist / x nlist)
(foreach x alist
(if (eq key (car x))
(setq nlist (cons (cdr x) nlist))))
(reverse nlist))

(defun c:stp (/ en ed pl)

(setq en (ssname (ssget '((0 . "SPLINE"))) 0)
ed (entget en)
pl (massoc 10 ed))

(command "_.PLINE")
(foreach p pl
(command p))
(command "")
(command "_.CHPROP" (entlast) "" "_LA" (cdr (assoc 8 ed)) ""
"_.PEDIT" (entlast) "_Spline" "_X")
(entdel en)
(redraw (entlast))

(prin1))

(c:stp)

Advertisements