Jump to content

erasing inside a box...help


Recommended Posts

Hello all

 

My first post, so apologies if not in the right place.

 

I am a novice user and on searching the forums I cannot find a thread which answers this questions in a language I can understand. I should add I just dont get other code orientated answers to similar posts.

 

I am working on a town plan and need to delete a number of lines within a box. This is so frustrating as using a rectangle everytime does not allow for easy erasing. I've already wasted hours trygint o find a solution. If only it had some kind of cut command for inside a polyline??...like photoshop...:x

 

I have seen the threads discussing extrim but this only trims...no good!

 

All comments and help would be really appreciated one very frustrated cad user!

 

Thank you and Kind Regards

 

Ejam

Link to comment
Share on other sites

Is something like this what you are trying to do? If so, try the "trim" command.

trim.JPG

 

After re-reading your post, I realize now that you said trimming wasn't enough. I don't know of a way to simply erase inside a box without using the "erase" command. One of the lisp gurus might be able to write a custom autolisp routine for you that would combine both commands, but sadly, that's not me. If one of them doesn't come up with something here, try reposting your question in the autolisp forum.

Link to comment
Share on other sites

Thank you Jack, alas Im afraid trimming doesnt help matters as there are many shapes (houses and roads) on my plan within the square which do not intersect the box as you have kindly drawn it.

 

Im trying to delete everything within it...

Link to comment
Share on other sites

You do realize that after invoking the erase command, you can erase either with a window or what is called a "crossing". The window will erase only those objects contained entirely in the rectangle you are dragging. A crossing will erase anything contained in it, as well as anything it touches. The window is created by dragging to the right and is solid. The crossing is created by dragging to the left and is a dotted line. If you happen to get objects you don't want using either method, hold the shift key down and pick that object again and it will be "deselected".

Link to comment
Share on other sites

box.jpg

 

I've atatched an image which shows once you've deleted the date within the box which took an eternity to select using only a rectangle selector your left with all these edges to erase too. Again some kind of command to delete everything within a polyline would be perfect and neat whilst saving so much time.

 

Thanks again

Link to comment
Share on other sites

If it not a closed polyline, you could use ERASE (or SELECT) with the WPolygon option to deleted everything completely inside the boundary, followed by EXTRIM

 

If it is a closed polyline, you could use EICP.lsp (Erase Inside a Closed Polyline) to quickly delete everything completely inside the polyline, combined with EXTRIM

 

With the 2nd, it should take able 10 seconds to do both steps, regardless of how many objects are involved.

Link to comment
Share on other sites

Thank you for your response nestly ....thats sounds perfect your link seemed to point to some code ? do I not need to simply enter EICP in the command line ? sorry youve lost me ?

Link to comment
Share on other sites

That code is called a "Lisp" which is basically a series of AutoCAD commands grouped together to perform a specific task. Lisps are not difficult to use, so if you're interested in learning how, just let us know. We'll probably just point you to one of the existing tutorials right here at Cadtutor.

 

That particular lisp will only work with a closed polyline, and after playing with it a little bit, it didn't always delete everything it should have, and it cleared my OSNAPS, so I'll try to find a more reliable one if your interested.

 

Did you try ERASE (or SELECT) with the WPolygon option? here's a demo of how that works

http://screencast.com/t/YlKC9AdGU

Link to comment
Share on other sites

Nestly...

 

just cut and paste the code into command prompt line cant be that simple me thought.!!..then things seems to go dead for a while it was crunching thought Id infested my machine with some horrible virus but hey then typed ECIP and bingo....

 

Awesome works like a dream with extrim

 

Thank you so much thats is going to save so much time with this masterplan.

Link to comment
Share on other sites

Really?, I didn't know you could run a Lisp from the command line.

 

Typically, you'd copy/paste the code into Notepad, then save it as EICP.lsp in your AutoCAD support folder, then use APPLOAD to load it into AutoCAD. After you do all that, then anytime you type EICP at the command line, the command will work.

 

Here's one tutorial on how to use Lisps

http://www.cadtutor.net/forum/showthread.php?1390-How-to-use-the-LISP-routines-in-this-archive&

Link to comment
Share on other sites

I could be wrong but I seem to remember that you could somehow (natively) draw a polyline through objects and then it would delete all those objects crossed by the polyline.

 

Although I personally would just draw a rectangle around everything you want to delete, trim anything that is crossing over the recttangle border, then delete everything inside of the rectangle. If you want your crossing window to be easier to use you could perhaps use a rotated viewport or modify the UCS.

Link to comment
Share on other sites

Dink,

 

I suspect you're thinking of a crossing polyline selection method. With this you enter your command and enter CP (crossing polyline). This will let you "draw" a polyline to define your selection (will work with any command).

 

Even if it doesn't answer the OP (which it won't do: AutoCAD behaving differently to photoshop in this case is a difference in philosophy between the two products) learning about the different selection methods is well worth a beginner's time. There's a lot more options than the obvious three selection methods. This link is pretty high on the google results page: http://cadecorner.blogspot.com/2007/05/autocad-selection-techniques.html

 

dJE

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...