TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: V-Man on July 29, 2008, 07:53:59 AM
-
Ok, this is a real easy one for you guys. I am trying to make a command to ask the user to select on an object (1 at a time) then it would then move that object a certain distance away from it's original posistion and loop through until cancelled. This is what I have. Please don't laugh, it's early Tuesday morning?
(command c:lwf ()
(setq ss1 (ssget))
(command "move" ss1 "" "0,0" "2000'<180")
)
This does not work.
Don
-
Hi
(defun c:lwf(/ sel)
(while (setq sel (entsel))
(command "_.move" (car sel) "" "0,0" "2000<180")
)
)
@+
-
Thanks Patrick_35 That's exactly it.
(defun c:lwf(/ sel)
(while (setq sel (entsel))
(command "_.move" (car sel) "" "0,0" "2000<180")
)
)
-
If you ever want to move all at once use this:
(defun c:lwf (/ ss)
(prompt "\nSelect items to move:")
(if (setq ss (ssget))
(command "_.move" ss "" "0,0" "2000<180")
)
(princ)
)
-
Thanks for the tip CAB