Nikon Posted Monday at 08:16 AM Posted Monday at 08:16 AM (edited) Good day everyone! I've discovered new (old?) the possibilities of a true rectangle. It is very convenient to work with him! The only drawback is that the rectangle is unstable. You can create it and work with it only in the current file. If you then close and open this file, the properties of the true rectangle are lost. Is it possible to make it stable so that its properties are preserved? https://autocadtips1.com/2011/11/20/autolisp-make-a-real-rectacgle/ AutoLISP: Make a Real Rectangle Posted on November 20, 2011 by AutoCAD Tips A long time ago, AutoCAD used to make Rectangles and polygons as their own entities. When you made a rectangle and then did a LIST <enter> on it, it would show as a rectangle. Nowadays, these objects are those objects in their geometry but are made of polyline entities. So modifying these objects is sometimes hard. that’s where this routine steps in to help. This routine lets you create a rectangle and even after you continue working elsewhere in your drawing, you can come back to that rectangle and modify that object and it acts like how rectangles used to act in AutoCAD. Here’s how: TREC <enter> to start “True RECtangle” Create a rectangle how you normally create one When needed, this routine will let you drag a single corner and the rest of the rectangle’s geometry will adjust accordingly to keep its geometry as a rectangle. TrueRect.lsp Edited Monday at 08:23 AM by Nikon 1 Quote
GLAVCVS Posted Monday at 12:48 PM Posted Monday at 12:48 PM Hi Nikon It seems your code is simply performing a scroll. You don't need Lisp to do that. Simply, select the grip and press the spacebar. Quote
GLAVCVS Posted Monday at 12:54 PM Posted Monday at 12:54 PM (edited) Ugh I think I watched your video too fast. I haven't had much time to do anything slowly lately I believe object reactors only survive the current drawing session. You must consider that the reactor was created relative to an object name, and object names change between drawing sessions. Edited Monday at 01:37 PM by GLAVCVS 1 Quote
Nikon Posted Monday at 01:49 PM Author Posted Monday at 01:49 PM It is a pity that there is no creation of a true rectangle in autocad itself! Quote
Lee Mac Posted Monday at 02:10 PM Posted Monday at 02:10 PM 20 minutes ago, Nikon said: It is a pity that there is no creation of a true rectangle in autocad itself! It can be done, but it requires creating a custom object using ObjectARX (C++). 1 Quote
Nikon Posted Monday at 03:29 PM Author Posted Monday at 03:29 PM 1 hour ago, Lee Mac said: It can be done, but it requires creating a custom object using ObjectARX (C++). Maybe someone will be able to do it someday. Quote
pkenewell Posted Monday at 03:32 PM Posted Monday at 03:32 PM (edited) @Nikon FWIW - you can use the midpoint grips to drag the rectangle in straight directions to keep it square. Edited Monday at 03:33 PM by pkenewell 1 Quote
Nikon Posted Monday at 04:46 PM Author Posted Monday at 04:46 PM (edited) 1 hour ago, pkenewell said: FWIW - you can use the midpoint grips to drag the rectangle in straight directions to keep it square. With a true rectangle, there is much less movement to change the position of the sides. Edited Monday at 04:46 PM by Nikon Quote
pkenewell Posted Monday at 04:52 PM Posted Monday at 04:52 PM @Nikon Like I said - "For What It's Worth". Note also you can shorten the steps slightly by using the PERP object snap. 1 Quote
Nikon Posted Monday at 05:08 PM Author Posted Monday at 05:08 PM (edited) 17 minutes ago, pkenewell said: @Nikon Like I said - "For What It's Worth". Note also you can shorten the steps slightly by using the PERP object snap. I agree with you, I use these bindings. But when I found out how easy it is to change a true rectangle, I "fell in love" with it. I've been working in Autocad since 2000, but I don't remember that it was possible to build such a rectangle back then. I wonder in which version of Autocad was such a command available? Edited Monday at 05:10 PM by Nikon Quote
dexus Posted Monday at 05:27 PM Posted Monday at 05:27 PM 38 minutes ago, Nikon said: With a true rectangle, there is much less movement to change the position of the sides. If you only edit the rectangle with this the rectangle will stay true and the editing will be a bit more intuitive because the preview will be a true rectangle as well: Quote
pkenewell Posted Monday at 05:33 PM Posted Monday at 05:33 PM @Nikon Technically - your example could be done with object reactors. Alternatively, you can also use 2D constraints, which have been in AutoCAD since version 2010. Quote
troggarf Posted Monday at 08:03 PM Posted Monday at 08:03 PM (edited) Just a follow up. I posted that long before I knew the importance of making sure that the Author of the code is noted as well as where I found the code. All credit goes to Gilles Chanteau. I have no idea where I found that code... It is probably somewhere here on cadtutor. I have since, started making sure that ifo is included as a header in the file, that way it doesn't look like I am trying to take claim for it and also, if/when something stops working I know where to go to address the issue. ~Greg original posting of code: https://www.theswamp.org/index.php?topic=29339.msg350137#msg350137 Edited Monday at 08:13 PM by troggarf 2 Quote
Danielm103 Posted 1 hour ago Posted 1 hour ago On 12/8/2025 at 11:29 PM, Nikon said: Maybe someone will be able to do it someday. Not too hard to create, a real pain to maintain as it must be compiled every time Autodesk decides to break binary compatibility 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.