Jump to content

Recommended Posts

Posted (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 by tombu
Posted
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 🍻

Posted
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") 😉

Posted

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.

 

Posted

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") 😉

 

Posted

Just use the spacebar to get a selection again ?

Posted

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

 

Posted
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。

Posted (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 by yxl030
  • 2 years later...
Posted (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 by jim78b

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