AutoCAD 2022: A lisp file that can “erase” ALL what’s inside or outside a particular boundary in one go,

AutoCAD 2022: A lisp file that can “erase” ALL what’s inside or outside a particular boundary in one go,

JamaL9722060
Collaborator Collaborator
2,949 Views
13 Replies
Message 1 of 14

AutoCAD 2022: A lisp file that can “erase” ALL what’s inside or outside a particular boundary in one go,

JamaL9722060
Collaborator
Collaborator

AutoCAD 2022: A lisp file that can “erase” ALL what’s inside or outside a particular boundary in one go,

 

I’m wondering if there is a lisp file that can “erase” ALL what’s inside or outside a particular boundary in one go.

 

Clip_170.jpg

---------------------------
Jamal Numan
0 Likes
Accepted solutions (1)
2,950 Views
13 Replies
Replies (13)
Message 2 of 14

john.uhden
Mentor
Mentor

@JamaL9722060 

Do a search in this forum for ssget_inside (or I'll post it again if you can't find it).

One decision you will have to make is whether you want to use a "Window Polygon" or "Crossing Polygon" method because you have to remember that while a circle, or block, or text can have its insertion point inside the boundary, there may be parts that extend outside, and vice versa.

John F. Uhden

Message 3 of 14

ronjonp
Mentor
Mentor

See attached ... no need for code.

ronjonp_0-1646526080305.png

 

Message 4 of 14

JamaL9722060
Collaborator
Collaborator

Thank you john.uhden. I would appreciate if you could provide me with the lisp file

 

Thanks ronjonp but I want this command so that I can use it for other drwaings

---------------------------
Jamal Numan
0 Likes
Message 5 of 14

3wood
Advisor
Advisor

You can also try SMARTSEL.

 

Message 6 of 14

JamaL9722060
Collaborator
Collaborator

Unfortunately, I’m not a developer and have no background how to write lisp files

---------------------------
Jamal Numan
0 Likes
Message 7 of 14

john.uhden
Mentor
Mentor

@JamaL9722060 

It's attached.

John F. Uhden

Message 8 of 14

hak_vz
Advisor
Advisor
Accepted solution

Try CookieCutter2  (type CC in system console)

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Message 9 of 14

Sea-Haven
Mentor
Mentor

No time for a coffee as cookie cutter is very fast used it for years.

Message 10 of 14

JamaL9722060
Collaborator
Collaborator

I have added the lisp file but appears not to be detected by the AutoCAD as per the screenshots below

 

What could be the issue here?

 

Clip_277.jpgClip_278.jpg

---------------------------
Jamal Numan
0 Likes
Message 11 of 14

hak_vz
Advisor
Advisor

@JamaL9722060 

At the bottom of the code it says
(defun c:CC () (CookieCutter2))

To run lisp command in console this function name has to start with c:

 

TYPE CC to system console to run CookieCutter

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Message 12 of 14

JamaL9722060
Collaborator
Collaborator

It works like a charm. Amazing. Thank you for the help

 

Clip_279.jpgClip_280.jpg

---------------------------
Jamal Numan
0 Likes
Message 13 of 14

clindner
Advocate
Advocate

CookieCutter is very impressive! 👋 Thanks for sharing.

 

One modification I would suggest: instead of exploding the blocks that cross the selected trimming object, use the XCLIP command instead and simply clip the block. There are a few benefits of this:

  • The block is still "trimmed" even if it's a non-explodable block. 
  • it retains the attribute value
  • The attribute's text value is "trimmed" as well!
  • The XCLIP option can also be applied to xrefs that cross the trimming object

 

Alternately, perhaps use BURST instead of EXPLODE on the block if it contains any attributes.


Please use the Accept as Solution or Kudo buttons when appropriate

Chris Lindner
CAD Technology Consultant @ onebuttoncad.com
AUGI Board of Directors

0 Likes
Message 14 of 14

john.uhden
Mentor
Mentor

@hak_vz ,

If you've got Civil 3D there is a MAPTRIM command.  It figures out the boundary from the objectS you select and you have the choice of trimming/erasing what's inside or out.  It's amazing.

John F. Uhden

0 Likes