Originally Posted by
gmiller.119448
Another really cool function would be to be able to select a flat line, gets is z, and then apply that to a selected line.
Code:
;Sets elevation of selected objects to the elevation of a source object
(defun c:ce ()
(defun dxf(code elist)
(cdr (assoc code elist)) ;finds the association pair, strips 1st element
);defun
(COMMAND "UCS" "W")
(setq ed (entget (car (entsel "Pick source: "))))
(if (= (DXF 0 ED) "LWPOLYLINE")
(SETQ el (DXF 38 ED))
(SETQ el (CADDR (DXF 10 ED)))
)
(setq ss1 (ssget ))
(command "change" ss1 "" "p" "e" el "")
(COMMAND "UCS" "P")
(prompt (rtos el 2 1))
(princ)
);defun