glazier Posted April 10, 2012 Share Posted April 10, 2012 Here is a good one, does anyone know how to draw a rectangle around the an object such as a spline or is there a way to find the edge of an object on the top bottom and sides, i know snapping to the object works but on complex objects you have to zoom in alot to find the farthest edge on an object, is there a command to find this Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 10, 2012 Share Posted April 10, 2012 (edited) It sounds like you are looking for the minimum enclosing rectangle required to surround an object. Is that correct? What version of AutoCAD are you using? I know of one lisp routine that will work in older releases of AutoCAD (ex. - AutoCAD 2007). It might work in newer versions too but I know it needs an additional line of code, which I have seen mentioned here, but at the moment I can't recall what it is. UPDATE. I do believe I found the answer for making the routine work in a newer release of AutoCAD such as 2012 where I tested it this morning. All I had to do was add one line: (vl-load-com). I'll post the lisp routine momentarily. But first I must give credit where it is due. The lisp routine BBOX was written by forum member R.K.McSwain and posted to the AutoCAD 2007 Discussion forum on 12-06-2006. I did not write it. With the exception of the one line I mentioned the code is in its original form. I named the lisp routine MinEncBox.lsp (Minimum Enclosing Box). Use the APPLOAD command to load it and type BBOX at the command line to start it. MinEncBox.lsp.txt Note: You'll have to edit the name of the file that I uploaded by removing the .txt file extension first. Edited April 10, 2012 by ReMark Quote Link to comment Share on other sites More sharing options...
MSasu Posted April 10, 2012 Share Posted April 10, 2012 You can start from this routine. 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.