Jump to content

moving object along a specific path


artuiel

Recommended Posts

Hello,

 

I'm looking for a macro (preferably. if not, then a lisp)

that will allow me to pick an object, then set an imaginary line between two points, and make the object move only along that line.

 

it should be similar to the MOVE command.

 

any ideas?

Link to comment
Share on other sites

I have not had success with setting the angle of polar tracking using 2 points.

 

You can temporarily set the UCS and then switch it back to world inside the same macro. In that case you'd use ortho to restrict the move.

 

Either way your users would have to keep their wits about them; I do not think you could restrict the move so much that it can only be moved along one plane (because ortho allows 2 planes). But in my opinion that would still be a useful, time-saving tool.

Link to comment
Share on other sites

Try this there is more combinations 2d versus 3d

 

(defun c:Test ( / pt1 pt2 pt3 obj)
(setq pt1 (getpoint "\nPick 1st point"))
(setq pt2 (getpoint "\nPick 2nd point"))
(setq obj (entsel "\nPick obj"))
(setq dist (getreal "\nEnter distance"))
(setq ang (angle pt1 pt2))
(setq pt3 (polar pt1 ang dist))
(command "move" obj "" pt1 pt3) 
)
(c:Test)

Link to comment
Share on other sites

  • 2 years later...
.. or something like this?

Open the GO_BACK_en.dwg (Format 2008 ).

Load the GO_BACK_en.lsp. Start by typing GO_BACK.

Good luck!

Regards

Jochen

 

 

Hi Jochen, or any other helpful poster.

 

I love this lisp and it is very useful to me.

I do however find it a problem to always control the direction of the path.

Is there any easy way to predict the motion direction along the path?

 

In any event, thank you Jochen for this lisp.

 

:)

Link to comment
Share on other sites

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