eyeofnewt555 Posted September 13, 2016 Posted September 13, 2016 Hey guys! If I had 3 regions like the picture, I'd like to be able to get the 2 intersecting regions (without doing them separately). Right now, I'm just getting errors Side request--a LISP that uses INTERSECT without deleting the original regions (similar to this lisp for the SUBTRACT command, or this lisp that does it for polylines rather than regions) Thanks! Quote
ronsingh78 Posted September 14, 2016 Posted September 14, 2016 (edited) I believe something like this may work. (defun c:mintersect (/ ss1 curcmdecho curnomutt) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end")) (princ (strcat "\nError: " errmsg)) ) ;_ end if (setvar 'cmdecho curcmdecho) (setvar 'nomutt curnomutt) (vla-endundomark adoc) ) ;_ end defun (vla-startundomark (setq adoc (vla-get-activedocument (setq acadObject (vlax-get-acad-object)))) ) ;_ end vla-startundomark (setq curcmdecho (getvar 'cmdecho) curnomutt (getvar 'nomutt) ) ;_ end setq (prompt "\nSelect Regions to create intersection :") (setq ss1 (ssget '((0 . "REGION")))) (prompt "\nPick points where to create intersections :") (setvar 'nomutt 1) (setvar 'cmdecho 0) (command-s "._-boundary" "_a" "_b" "_n" ss1 "" "_o" "_r" "" pause) (command "._erase" ss1 "") (*error* "end") (princ) ) ;_ end defun Edited September 14, 2016 by ronsingh78 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.