Community
Hello,
It seems like the routine posted in the first reply is exactly what I am looking for to save me a lot of time, but unfortunately when I load it into AutoCAD 2010 I get nothing. Is there some sort of formatting change that needs to be made? I am pretty new to AutoLISP and would appreciate any help getting this routine to run very much.
Thanks,
Here is my solution:
;; List Clockwise-p - Lee Mac ;; Returns T if the point list is clockwise oriented (defun LM:ListClockwise-p ( lst ) (minusp (apply '+ (mapcar (function (lambda ( a b ) (- (* (car b) (cadr a)) (* (car a) (cadr b))) ) ) lst (cons (last lst) lst) ) ) ) )
Test function:
(defun c:test ( / e ) (if (setq e (ssget "_+.:E:S" '((0 . "LWPOLYLINE")))) (LM:ListClockwise-p (apply 'append (mapcar (function (lambda ( x ) (if (= 10 (car x)) (list (cdr x))) ) ) (entget (ssname e 0)) ) ) ) ) )
Can't find what you're looking for? Ask the community or share your knowledge.