Jump to content

Recommended Posts

Posted

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?

Posted (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)

image.png.c6a4955e06c42565683e020d377f2ac5.png

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 by BIGAL
Posted

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).

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...