0 Members and 1 Guest are viewing this topic.
(defun c:minters (/ ss clst rlst) (vl-load-com) (or *acad* (setq *acad* (vlax-get-acad-object))) (or *acdoc* (setq *acdoc* (vla-get-ActiveDocument *acad*))) (if (ssget '((0 . "CIRCLE"))) (progn (vlax-for c (setq ss (vla-get-ActiveSelectionSet *acdoc*)) (setq clst (cons c clst)) ) (vla-delete ss) (setq space (if (= 1 (getvar 'cvport)) (vla-get-PaperSpace *acdoc*) (vla-get-ModelSpace *acdoc*) ) ) (setq rlst (vlax-invoke space 'AddRegion clst)) (setq reg (car rlst) rlst (cdr rlst) ) (while rlst (vla-Boolean reg acIntersection (car rlst)) (setq rlst (cdr rlst)) ) (if (< 0.0 (vla-get-Area reg)) (progn (setq hatch (vla-AddHatch space acHatchPatternTypePredefined "ANSI31" :vlax-false 0 ) ) (vlax-invoke hatch 'AppendOuterLoop (list reg)) (vla-delete reg) ) ) ) ) (princ))
(or *acad* (setq *acad[color=blue]*[/color] (vlax-get-acad-object)))