You are here:

AutoCAD/Rotate3D command in lisp file

Advertisement


Question
I am trying to use the command rotate3d in a lisp file but i keep getting an error message that says "rotate3d unknown command".
Here is how i have the lisp file:

(defun c:rtd ( / )  
(command "rotate3d" "all" "" "yaxis" "" "90")
(princ)
)

any ideas?
Thanks,
Kevin

AutoCAD 2002

Answer
you can't call a lisp C: function with the command function.
You can call them like this: (c:functionname), but you won't be able to sequence the resulting prompts with the command funtion either.
if you can figure out how to use one or more of it's internal functions, or gut the code to do only what you want, you might be able to accomplish the same thing.
alternatively, you could just make a toolbar button that does the work for you - that's probably what I'd recommend in this case.

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scott Cook

Expertise

I`ve been using AutoCAD since 1987 and programming AutoLISP nearly as long. I can answer questions about programming AutoCAD (except ARX) and production enhancement techniques. I cannot answer questions about AutoCAD crashes or DWG corruption. AutoCAD PROGRAMMING (menus, lisp) related questions only!

Experience

Since 1987. Author of Plot2000 software for for AutoCAD, http://www.plot2000.com. PROGRAMMING QUESTIONS ONLY PLEASE. Questions that are NOT related to programming or AutoCAD customization (menus and lisp only please) are outside the scope of my volunteer services and will NOT BE ANSWERED.

©2012 About.com, a part of The New York Times Company. All rights reserved.