(defun c:mvz(/ ss1 rz rd) (if (and(setq ss1 (ssget) txt (car (entsel "\nSelect Text for Z Coord: ")))) (progn rd(strcat "0,0," (rtos (cdr (assoc 1 (entget txt))))) (command "move" ss1 "" "0,0,0" rd)) (princ "\n Error in Selections ")) (princ)) Lee, I get this:
Command: mvz
Select objects: 1 found
Select objects:
Select Text for Z Coord: ; error: bad argument type: numberp: Haha... I'm a moron.... the text you are selecting is already a string and not a number... so I was trying to convert a string to a string...
(defun c:mvz(/ ss1 rz rd) (if (and(setq ss1 (ssget) txt (car (entsel "\nSelect Text for Z Coord: ")))) (progn (setq rd (strcat "0,0," (cdr (assoc 1 (entget txt))))) (command "move" ss1 "" "0,0,0" rd)) (princ "\n Error in Selections ")) (princ)) All right now. Thank a lot, Lee. No problem Phiphi, it was a stupid mistake on my part
Glad it works now
Lee
页:
1
[2]