Juergen Posted May 27, 2022 Posted May 27, 2022 Hi, is it possible to select rectangles, then select a vertex and this selection will be accept for the other rectangles? Thanks. Quote
BIGAL Posted May 27, 2022 Posted May 27, 2022 So select rectangles then pick a corner and it finds same corner is that right ? Ok so UL LL UR LR are 4 corners if rectangs are always ortho then its easy use VL bounding box. have to go now will try later to write something. Quote
BIGAL Posted May 29, 2022 Posted May 29, 2022 (edited) ; https://www.cadtutor.net/forum/topic/75273-select-vertex-from-rectangles/ ; Corner select by Alanh May 2022 (defun c:wow ( / ss cnr pointmin pointmax obj ) (setq ss (ssget (list (cons 0 "LWPOLYLINE")))) (if (= ss nil) (alert "No objects match so skipping") (progn (setq lst '()) (setq cnr (getstring "\n Enter UL LL UR or LR ")) (repeat (setq x (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1))))) (vla-GetBoundingBox obj 'minpoint 'maxpoint) (setq pointmin (vlax-safearray->list minpoint)) (setq pointmax (vlax-safearray->list maxpoint)) (cond ((= (strcase cnr) "UL")(setq pt (list (car pointmin) (cadr pointmax)))(setq lst (cons pt lst)) ) ((= (strcase cnr) "LL")(setq pt (list (car pointmin) (cadr pointmin)))(setq lst (cons pt lst)) ) ((= (strcase cnr) "UR")(setq pt (list (car pointmax) (cadr pointmax)))(setq lst (cons pt lst)) ) ((= (strcase cnr) "LR")(setq pt (list (car pointmax) (cadr pointmin)))(setq lst (cons pt lst)) ) ) ) ) ) (princ lst) (princ) ) Try this as a start can do the corner select better. Edited May 29, 2022 by BIGAL Quote
Juergen Posted May 30, 2022 Author Posted May 30, 2022 Hi Bigal, thank you for writing the program, but it should work eg. the strech function. It could be that a rectangle in the line must not be to strech. Quote
BIGAL Posted May 30, 2022 Posted May 30, 2022 If your just trying to stretch say all bottoms you do not need code stretch works that way when you use a partial window just window all bottoms. Explain more. Quote
exceed Posted May 30, 2022 Posted May 30, 2022 (edited) The reason why you can't grab multiple sides of a rectangle with handles by default in CAD is that they are not modified together. Except for the STRETCH command If you want to stretch each side of the rectangle with a constant offset, you can use the basic STRETCH command. As gif below But for a simple rectangle, you can get information on each corner like BIGAL's code and you can add some loop code for each rectangle to make it look like it's stretched together. In this case, have to select the target rectangle anyway, so I'm not sure if there is a benefit compared to not using STRETCH. So, tell us 'detail' about your need. And it is more common to use BLOCK to modify multiple objects at the same time because If only one BLOCK is modified, all of them are modified. Edited May 30, 2022 by exceed 1 Quote
Juergen Posted May 30, 2022 Author Posted May 30, 2022 Hi exceed, thanks for the video clip. Now I understand what the stretch command exactly do. Thanks for your support you solved my problem. 1 Quote
BIGAL Posted June 1, 2022 Posted June 1, 2022 Thanks exceed for the video that is exactly what I was describing. Which video capture do you use ? The one I use did an upgrade and now does not work so looking for another. 1 Quote
exceed Posted June 2, 2022 Posted June 2, 2022 (edited) On 6/1/2022 at 9:52 AM, BIGAL said: Thanks exceed for the video that is exactly what I was describing. Which video capture do you use ? The one I use did an upgrade and now does not work so looking for another. how about this? this is open source freeware https://www.screentogif.com/ and I upload it to google blogger and paste it by other media -> insert image from URL Edited June 2, 2022 by exceed Quote
mhupp Posted June 2, 2022 Posted June 2, 2022 there is a bug uploading gifs from that program. upload here and post a link https://imgbb.com/ Quote
BIGAL Posted June 2, 2022 Posted June 2, 2022 That is what I have and it wants new .net libraries tried 3 times to install new library Microsoft .net says done but not working any more. Yes Gifs do not load to here. 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.