nicolas Posted July 28, 2010 Posted July 28, 2010 Hi, I am looking for a way to automatically draw a rectangular/square frame around a block (in this case, a block of a profile) and also set the base point in the middle of the profile block. I have to use xline together with rectangle to do this, then draw a diagonal and use the midpoint of the diagonal each time. It would be great to know if there is a way to automate the process. I do understand that I can find the diagonal of the frame using LIST yet i can see no way to apply this into the routine. Thank you very much. Regards, Nicolas. Quote
ReMark Posted July 28, 2010 Posted July 28, 2010 So you're looking for a lisp routine that 1) draws a rectangle or square around a block and 2) centers the rectangle or square on the block right? And the block can be any shape or size right? Does 2006 have the MTP command? Quote
nicolas Posted July 28, 2010 Author Posted July 28, 2010 Well I am working with Autocad 2011 at work and it is there that I need to know more of a technique to automate or to assist me with that routine. The profile can be of different shapes, mostly non-rectangular. I used xlines and rectangle to draw a bounding box around them and then use the diagonal of the bounding box to locate the centre of the profile box. The use of alias (xx for xline and rec for rectangle) and the more powerful rectangle command (the new grips are awesome) are helping but more is welcomed. Quote
nicolas Posted July 29, 2010 Author Posted July 29, 2010 I entered MTP without any success in Autocad 2008 and 2011. Is it a concept or an abbreviation? Quote
ReMark Posted July 29, 2010 Posted July 29, 2010 MTP or M2P Locates the midpoint between two points. Command entry: At a prompt to locate a point, enter mtp The midpoint between two points (MTP) command modifier can be used with running object snaps or object snap overrides. (OSNAP command) At any Command prompt to locate a point, enter mtp or m2p. First point of mid: Specify a point Second point of mid: Specify a second point MTP is a command modifier. That means it will only work in the middle of another command such as Move or Copy. It does work in 2011 as I just tested it moments ago. Quote
nicolas Posted July 30, 2010 Author Posted July 30, 2010 Thanks you. I do know about the OSNAP setting but I believe that knowing the command mtp will be a great tool in saving time the mouse click and the lookout. However I would like to know whether there is a possibility to use it with an alias like "m" or function key with CUI. Regards, Nicolas. Quote
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.