Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rotate3d command

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Patchy
524 Views, 6 Replies

Rotate3d command

Hi,

The command rotate3d asks for selecting objects and which axis is too lengthy.

How do I just select objects, pick a point, and rotate the items I selected on Y axis with rotation of example 60 degrees ?

 

Thank you for your help.

 

 

 

6 REPLIES 6
Message 2 of 7
Kent1Cooper
in reply to: Patchy


@Patchy wrote:

....

The command rotate3d asks for selecting objects and which axis is too lengthy.

How do I just select objects, pick a point, and rotate the items I selected on Y axis with rotation of example 60 degrees ?

....


One way would be to put this macro in a toolbar button or menu item somewhere:

 

^C^CSELECT \ROTATE3D P  Y \60

Kent Cooper, AIA
Message 3 of 7
Patchy
in reply to: Patchy

Thank you Kent,

Can this be wrote in lisp?

 

(defun c:rty ( / )
(command "_rotate3d" pause .......... ??

Message 4 of 7
Kent1Cooper
in reply to: Patchy


@Patchy wrote:

Thank you Kent,

Can this be wrote in lisp?

 

(defun c:rty ( / )
(command "_rotate3d" pause .......... ??


(command "_.rotate3d" (ssget) "" "Y" pause "60")

Kent Cooper, AIA
Message 5 of 7
Patchy
in reply to: Patchy

Beautiful.

Thank you Kent.

Message 6 of 7
Kent1Cooper
in reply to: Patchy


@Patchy wrote:

Beautiful.

Thank you Kent.


You're welcome.  That seems so specific [Y axis only, 60 degrees only] that I wonder whether you might want different ones at times.  Rather than duplicate the whole line of code with different variables built in for each circumstance, you could do it as a function with arguments:

 

(defun r3 (ax rot)

  (command "_.rotate3d" (ssget) "" ax pause rot)

)

 

That could be the basis of any number of commonly-used combinations, making for shorter individual command definitions:
 

(defun C:r3y60 ()

  (r3 "Y" "60")

)

(defun C:r3x45 ()

  (r3 "X" "45")

)

(defun C:r3y90 ()

  (r3 "Y" "90")

)

(defun C:r3x-90 ()

  (r3 "Y" "-90")

)

 

and would also be available for use directly, for uncommon circumstances that don't deserve their own command definitions:

 

(r3 "Y" "22.5")

(r3 "X" "-15")

Kent Cooper, AIA
Message 7 of 7
Patchy
in reply to: Patchy

I'm so fast now, i'm out of things to do

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost