TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: rude dog on March 18, 2004, 11:52:59 AM
-
(defun c:gl ()
(setq pt (getpoint "\nPick a point "))
(setq npt (mapcar '0.5* (list pt)))
)
(princ)
stumped...trying to multiply 0.5 by the X value of (list pt) (which then would be the X value in a new list) then the Y value of (list pt) (which then would be the Y value in a new list) and then the Z value of (list pt) (which then would be the Z value in a new list) I have never used mapcar before and didnt know if this (when written properly) would work.
-
Try this:
(mapcar '(lambda (x) (* x 0.5)) ptlist)
where ptlist is the point list
-
wonderful..saves me alot of steps..thanks
-
Also have a look at this thread;
http://theswamp.org/phpBB2/viewtopic.php?t=340
-
thanks MT....