Spiderguy Posted 18 hours ago Posted 18 hours ago Sorry about the vague title... I was wondering about mixing input types when inputting the size of the rectangle. I often know one dimension of a rectangle but don't know the other, for instance, when drawing a 1/2" wide rectangle, I'll select the origin point then i type in 1/2", type in an arbitrary number to get the rectangle on the screen, then grab the grip and drag it to perpendicular to a line that is at the length of what I need... Is there a way to type the distance for either x or y and make a selection for the other? Quote
BIGAL Posted 13 hours ago Posted 13 hours ago (edited) You could use a lisp method of selecting a base point, then other corner. This is just the first part if happy with idea will do the next step. (defun c:dorect ( / ) (command "rectangle" pause pause) (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (entlast))))) (setq d1 (distance (nth 0 co-ord)(nth 1 co-ord))) (setq d2 (distance (nth 1 co-ord)(nth 2 co-ord))) (if (not AH:getvalsm)(load "Multi Getvals.lsp")) (setq ans (AH:getvalsm (list "Enter values " "Distance 1" 7 6 (rtos d1 2 2) "Distance 2" 7 6 (rtos d2 2 2) ))) ; now readjust the rectang (princ) ) (c:dorect) Save the Multi getval.lsp in a support path or add the full path to the (load. Some one smarter than me may have a Gread method showing the distance as you drag the rectang edge. Multi GETVALS.lsp Edited 13 hours ago by BIGAL Quote
SLW210 Posted 2 hours ago Posted 2 hours ago Are you using the Dimensions option of the rectangle command? Rec>Specify first corner point>(D)imensions>Specify length (X) for rectangles (you can enter a number or select two points on screen)>Specify width (Y) for rectangles (you can enter a number or select two points on screen). Quote
CyberAngel Posted 14 minutes ago Posted 14 minutes ago (edited) The way I do that kind of pick is to filter the input. You can type .X, .Y, and/or .Z when it expects a point and give it some input. It uses one/two values, ignores the rest, and waits for more input. For instance, suppose I want to line up a table in an array of tables. I select the top left corner of the new table as the base point. I type .X and pick a point on the left side of a table in the column. It still needs a Y, so I type .Y and pick a point on the top side of a corresponding table in the row. You could draw lines from those points and place the table where they intersect, but it's quicker to use filters. Of course, you can use any kind of snap or selection option for either point. If you need a specific offset distance, you can pick a point and then use the _From snap to locate the second point. Simple but effective. Edited 13 minutes ago by CyberAngel 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.