Jump to content

Recommended Posts

Posted

Hi,

 

Consider following code

 

(command "move" obj "" p1 pause)

 

when the command reaches 'pause' If I right click (to keep the object in same location) instead of left click, the object automatically moves to some strange location. Same is the case with copy command. I noticed same happens even if we use the commands manually. This happens with all the entities line/pline/block etc.

 

Can somebody explain this behaviour of AutoCAD.

 

Thanks.

Posted

When right-clicking at the prompt:

 

Specify second point or <use first point as displacement>:

You are selecting to: .

 

This means the vector from the origin to the first selected point is used as the displacement vector.

 

e.g.

 

movevector.png

Posted

Just cheat and use the acet-ss-drag-move function (if you have Express Tools).

 

eg.

;; (acet-ss-drag-move <selection-set> <base-pt> [<prompt>] [<hilight> [<cursor>]])

(defun c:test (/ ss p1 p2)
 (if (and (setq ss (ssget "_:L"))
          (setq p1 (getpoint "\nSpecify base point: "))
          (setq p2 (acet-ss-drag-move ss p1 "\nSpecify second point: " T))
     )
   (command "_.move" ss "" "_non" p1 "_non" p2)
 )
 (princ)
)

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