Spiderguy Posted 6 hours ago Posted 6 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 1 hour ago Posted 1 hour 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 59 minutes ago by BIGAL 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.