Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/04/2019 in all areas

  1. You are correct .. updated the code above to do a few more objects
    1 point
  2. ronjonp If you have a circle does not do anything to it. Nicely done though circle may never exist.
    1 point
  3. Based on code here this should do what you want: (defun c:foo (/ r o n s) ;; RJP » 2019-04-03 (cond ((and (setq s (ssget ":L" '((0 . "circle,ellipse,lwpolyline,spline")))) (setq s (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))) (setq s (vl-remove-if-not '(lambda (x) (vlax-curve-isclosed x)) s)) (setq n (vlax-ename->vla-object (cdr (assoc 330 (entget (car s)))))) (setq s (vl-sort (mapcar 'vlax-ename->vla-object s) '(lambda (a b) (> (vlax-curve-getarea a) (vlax-curve-getarea b))) ) ) ) (setq r (car (vlax-invoke n 'addregion (list (car s))))) (setq o (vlax-invoke n 'addregion (cdr s))) (mapcar (function (lambda (x) (vla-boolean (vla-copy r) acintersection x))) o) (mapcar 'vla-delete s) (vla-delete r) ) ) (princ) ) (vl-load-com)
    1 point
×
×
  • Create New...