Tyke Posted September 1, 2010 Share Posted September 1, 2010 My brains gone to bed but I'm still here. Is there a way within AutoCAD to delete all objects within a rectangle (closed polygon) or all objects outside of the rectangle? This then leads on to the question if you can trim to a rectangle or extend to it. I believe I have seen it done somewhere, but it was a long time ago. I know there are LISP routines out there that can do it, but just this once I want to do it the hard way ;-)) My problem is I have received a drawing from someone else, but I only need part of it. So before inserting it into my drawing I need to get rid of the stuff I don't need. It's easy enough to define the boundary of the area I need, a rectangle or polygon. Anybody got an idea? Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 1, 2010 Share Posted September 1, 2010 Re: trimming. Look at the EXTRIM command (Express Tools - command line only) or at Trims.zip at Cad Corner (Canada) that contains three different lisp routines that will trim/erase entities inside or outside of a user defined box. Link: http://www.cadcorner.ca/lisp.php You'll have to scroll down a ways to find it listed. Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted September 1, 2010 Share Posted September 1, 2010 1. What about the standard selection method(s)? If you use the window selection method, everything contained inside the window will be selected. If you use the crossing selection method, everything inside and touching the window will be selected. 2. Yes, you can trim and extend to a rectangle polyline 3. If your selection area is not a rectangle or square, then you can use the "window polygon" or "crossing polygon" with the same effects as described above. Quote Link to comment Share on other sites More sharing options...
Dana W Posted September 1, 2010 Share Posted September 1, 2010 Short of a lisp routine, you will just have to zoom out and select the objects outside the rectangle with an include or crossing window, then erase. If you have pickadd and pickfirst set to , you can use multiple select windows and/or clicks before erasing. Just don't zoom any of the selected objects off the screen until you erase. For some reason AutoCAD forgets what is selected if it goes off screen. If you select a large amount of objects at once, you may not see the grips highlight, if the count exceeds your grip display limit set on your tools > options > selection tab. Just have the selected objects set to highlight by dash or thicken or both so you will be able to tell what is selected. Yes, you can extend and trim using a rectangle as a 'fence'. (Did it really take me that long to type this? two posts? You guys are fast). Quote Link to comment Share on other sites More sharing options...
rkent Posted September 1, 2010 Share Posted September 1, 2010 Rather than select objects and worry about objects off the screen not being selected use, Erase, All, enter, Remove, crossing window inside rectangle, enter. Quote Link to comment Share on other sites More sharing options...
Tyke Posted September 1, 2010 Author Share Posted September 1, 2010 Hi guys, thanks for the "express" service. ReMark: Thanks for the tip for Express Tools, I didn't realise there are command line only functions. Now that I've read the help text things are clearer. The EXTRIM command does the trimming great. I tried the LISP routine but it bombs out when I issue the command. I'm running a German language version of Civil 2011 on a HP Workstation with a German Windows XP Pro as OS. I don't know if there's something in there that's causing a problem, but I've looked at the LISP code and it seems clean enough. All the English commands are prefixed with an "_", so it should work, but it doesn't. I need a bit of time to look at that. rkmcswain: I've tried using what you suggested, but that's not working 100% either. In a test situation I have a rectangle with various lines and polylines within, without and crossing the rectangle and some are trimmed others not. Dana W: PICKADD and PICKFIRST are set to 1. The tip about zooming selected items off screen is a known problem here too, but thanks anyway as alot of people don't know about it. Thanks guys your suggestions are most welcome and appreciated. Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted September 1, 2010 Share Posted September 1, 2010 rkmcswain: I've tried using what you suggested, but that's not working 100% either. In a test situation I have a rectangle with various lines and polylines within, without and crossing the rectangle and some are trimmed others not. Ok, my #1 was answering your second sentence only. (There was no mention of "trimming" objects there.) Yea, I think EXTRIM should do what you want. Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 1, 2010 Share Posted September 1, 2010 Das klingt wunderbar. Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted September 1, 2010 Share Posted September 1, 2010 Try this codes: cut.zip Quote Link to comment Share on other sites More sharing options...
Dana W Posted September 1, 2010 Share Posted September 1, 2010 Rather than select objects and worry about objects off the screen not being selected use, Erase, All, enter, Remove, crossing window inside rectangle, enter. I make it a habit of never using 'erase' and 'all' on the same day, much less in the same sentence. You can also trim and extend everything trimmable and extendable at/to the rectangle with crossing windows. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 7, 2010 Share Posted September 7, 2010 Forget the rectangle go the whole hog and just trim to any shape polyline including curves, you just use the trim command pick the polyline as a cutter but pick a second offest polyline as a "fence", you can bounce the offeset line further out if required or as I did change the objects inside the trim to a dummy layer then erase all objects not on the dummy layer change layer back again all done. Its the only bit of code I don't have was written for a specific client to trim waffle building construction pads. Like Dana above use the WP option to pick within polygon. Quote Link to comment Share on other sites More sharing options...
khoshravan Posted June 28, 2011 Share Posted June 28, 2011 For some reason AutoCAD forgets what is selected if it goes off screen. Is it really true? Isn't it fixed in newer versions of ACAD (2010)? Quote Link to comment Share on other sites More sharing options...
Dana W Posted June 28, 2011 Share Posted June 28, 2011 Is it really true?Isn't it fixed in newer versions of ACAD (2010)? I dunno. You got 2010, I don't. Anyway, I have not had that happen to me since the 2007 version. Quote Link to comment Share on other sites More sharing options...
nestly Posted June 28, 2011 Share Posted June 28, 2011 Is it really true?Isn't it fixed in newer versions of ACAD (2010)? That's not a bug. Imagine the carnage that would ensue if a selection window did include off screen objects that inadvertently got selected when the user zooms or pans to a different area of the drawing. Quote Link to comment Share on other sites More sharing options...
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.