AutoCAD Tip: Using Lisp to cut elements within multiple polyline boundaries

Marketing
Marketing
  • Updated

By Dennis Collin

AutoCAD_Tip_-_Using_Lisp_to_cut_elements_within_multiple_polyline_boundaries_-_1.PNG

Recently I posted about the AutoCAD Express Tool, Extrim command which allows users to trim elements within or outside a polyline boundary. Whilst this command is useful it only allows the selection of a single boundary whereas sometime multiple boundaries need to be selected, for example large scale urban street layouts.

AutoCAD_Tip_-_Using_Lisp_to_cut_elements_within_multiple_polyline_boundaries_-_2.PNG

Copy or type the following into a simple text editor like Notepad and save the file as MX.txt. The file extension will need to be changed to ‘.LSP’ (Lisp) extension.

AutoCAD_Tip_-_Using_Lisp_to_cut_elements_within_multiple_polyline_boundaries_-_3.PNG

Once complete this Lisp routine can be loaded into AutoCAD via the Appload function. This process is outlined on the link below.

https://www.cadlinecommunity.co.uk/hc/en-us/articles/360003707777-AutoCAD-Improving-productivity-with-external-routines

The sample code provided will only select lightweight polylines drawn on Layer 0 (Zero) and coloured yellow. The routine just trims items so any residual items will need to be deleted by conventional means after. With some adjustment of the code, the editing behaviour could be altered to suit.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.