The LISP routine featured today is by Marko Ribar and can be found at CADTutor.net at the following Link: http://www.cadtutor.net/forum/showthread.php?88293-EXTRIM-Between-Two-Lines&p=605998&viewfull=1#post605998 If you have any questions or requests or even saying a “Thank you” to Marko, about the routine, please post them at the forum. I am sure that Marko would like to know if he needs to tweak anything and would appreciate any gratitude.
Please copy the code from the CADTutor link above
The routine uses the concept of the EXTRIM command that is found in the Express Tools and applies this approach to trimming objects that cross both of the selected edges (boundaries).
- EXB2C [enter]
- Select 2 separate objects to define the trimming edges
- Click the cursor between the 2 edges that you selected to define the area that you want trimmed.
Note that if objects do not cross both of the edges that you select, the outcome seems to not want to trim certain objects (shown below).
But if this is the scenario that you encountering, you should just use the Express Tool EXTRIM to accomplish what you need (shown below). You might also find the following link to another LISP routine that puts a spin on the EXTRIM command as a helpful tool as well: https://autocadtips.wordpress.com/2012/03/08/autolisp-trim-objects-on-one-side/