
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi. I am wanting to write a lisp to repeat rotate objects with a specified angle at the start. I want to specify the angle at the start and then make various selection sets which would rotate by this angle each time I specify a new selection set.
So far, the code I have made looks like this, but it doesn't seem to work. The selection set is not valid or something I don't know, maybe I cannot use the (command "rotate") thing with this?
(defun dtr (deg)(* pi (/ deg 180.0)))
(defun r2d (deg)(* 180.0 (/ deg pi)))
(defun c:reprot ()
(defun *error* (s)
(vl-bt)
(setvar "osmode" oldsnap)
(princ)
)
(setq oldsnap "osmode")
(setvar "osmode" 0)
(setq ang (getreal "\nEnter angle to repeat rotate objects with: "))
(while
(princ "\nSelect objects: ")
(setq ss (ssget))
(setq p (getpoint "\nClick on base point: "))
(command "rotate" ss p ang)
)
(setvar "osmode" oldsnap)
)
Thanks
Derryck
Solved! Go to Solution.