AutoLISP: EXTRIM Between Two Edges

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).

Here’s how:

  • 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.

EXB2C 3 EXTRIM

 

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).

EXB2C 2

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/

EXB2C 3 EXTRIM

About AutoCAD Tips

This blog serves as a knowledge base for myself (and anyone else) so that I can reference tips & tricks that I have learned and also refer others to it as well. I hope that this blog helps you learn at least one tip to make your drafting/design experience better.
This entry was posted in AutoLISP, AutoLISP: Modify, Express Tools. Bookmark the permalink.

Leave a comment