tombu Posted December 2, 2020 Posted December 2, 2020 (edited) Try the no code way: With ortho on select an object, pick a grip, hit spacebar to use move, enter C to Copy, enter a distance, now hold down the Ctrl key to make copies in increments of the distance you entered in whatever direction you wish. Works with other grip commands like Rotate as well. Don't know which versions this works with, just know it works with 2021. Edited December 2, 2020 by tombu Quote
ronjonp Posted December 2, 2020 Posted December 2, 2020 18 hours ago, yxl030 said: By the way, I often divide a picture drawn together into 3 or 4 pictures. Your program is very helpful to me. Glad to help Quote
ronjonp Posted December 3, 2020 Posted December 3, 2020 18 hours ago, yxl030 said: ronjonp,Thank you for your reply so quickly. That's pretty much it. Can you make the program like this: [press the 4a/5s/6d/8w] after the object is moved, allowed to select a new object immediately ? Now that this one is waiting for the arrow key again, it's easy to make an error by moving the object again. Just change: (wcmatch g "2,S") to (wcmatch g "5,S") Quote
yxl030 Posted December 3, 2020 Posted December 3, 2020 Thanks. But...it doesn't seem to work with 2014 , and the operation is quite complicated. 11 hours ago, tombu said: Try the no code way: With ortho on select an object, pick a grip, hit spacebar to use move, enter C to Copy, enter a distance, now hold down the Ctrl key to make copies in increments of the distance you entered in whatever direction you wish. Works with other grip commands like Rotate as well. Don't know which versions this works with, just know it works with 2021. Quote
yxl030 Posted December 3, 2020 Posted December 3, 2020 I have mistyped .Maybe my English is too poor to express myself clearly. Now,the lisp is: Select object --> wait key[4a/2s/6d/8w] --> move the object --> wait key[4a/2s/6d/8w] --> move the object again --> until [ENTER/SPACEBAR to Exit] --> Select object... What I want is : Select object --> wait key[4a/2s/6d/8w] --> move the object -->Select new object --> move the new one... Just move the object once. 1 hour ago, ronjonp said: Just change: (wcmatch g "2,S") to (wcmatch g "5,S") Quote
ronjonp Posted December 7, 2020 Posted December 7, 2020 Just use the spacebar to get a selection again ? Quote
BIGAL Posted December 8, 2020 Posted December 8, 2020 As I said before CHX, here is CHY as well works the way you want set distance then pick pick pick. Supports -ve value. (defun C:CHY ( / sn ht) (SETVAR "CMDECHO" 0) (setq sn (getvar "osmode")) (command "osnap" "near") (princ "alters object in Y direction") (setq ht (getstring "\n What is amount of change: ")) (setq newht (strcat "0," ht)) (while (SETQ NEWobj (entsel "\nPoint to object, Enter to stop : ")) (command "move" newobj "" "0,0" newht) ) (setvar 'osmode sn) (princ) ) (defun C:CHX ( / sn ht) (SETVAR "CMDECHO" 0) (setq sn (getvar "osmode")) (command "osnap" "near") (princ "\nalters object in X direction") (setq ht (getstring "\n What is amount of change: ")) (setq newht (strcat ht ",0")) (while (setq newobj (entsel "\nPoint to object, Enter to stop : ")) (command "move" newobj "" "0,0" newht) ) (setvar 'osmode sn) (princ) ) Quote
yxl030 Posted December 12, 2020 Posted December 12, 2020 On 12/8/2020 at 5:35 AM, ronjonp said: Just use the spacebar to get a selection again ? After [[4a/2s/6d/8w] move the object, then immediately select the new object。 Quote
yxl030 Posted December 12, 2020 Posted December 12, 2020 (edited) On 12/8/2020 at 10:45 AM, BIGAL said: As I said before CHX, here is CHY as well works the way you want set distance then pick pick pick. Supports -ve value. (defun C:CHY ( / sn ht) (SETVAR "CMDECHO" 0) (setq sn (getvar "osmode")) (command "osnap" "near") (princ "alters object in Y direction") (setq ht (getstring "\n What is amount of change: ")) (setq newht (strcat "0," ht)) (while (SETQ NEWobj (entsel "\nPoint to object, Enter to stop : ")) (command "move" newobj "" "0,0" newht) ) (setvar 'osmode sn) (princ) ) (defun C:CHX ( / sn ht) (SETVAR "CMDECHO" 0) (setq sn (getvar "osmode")) (command "osnap" "near") (princ "\nalters object in X direction") (setq ht (getstring "\n What is amount of change: ")) (setq newht (strcat ht ",0")) (while (setq newobj (entsel "\nPoint to object, Enter to stop : ")) (command "move" newobj "" "0,0" newht) ) (setvar 'osmode sn) (princ) ) BIGAL,Thanks,I can basically understand your program. If it's just a direction of movement, your program is fine. In fact, my task is to divide the contents of a drawing into three or four parts. ronjonp‘s program is well suited to my needs. Edited December 12, 2020 by yxl030 Quote
jim78b Posted January 16, 2023 Posted January 16, 2023 (edited) hello, thanks for the code, is possible make multi selection window? thanks in advance. there is another thing that doesn't work with lisp, after running it it takes away all my snaps Edited January 16, 2023 by jim78b 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.