JonathanP Posted September 4, 2009 Posted September 4, 2009 I found this lisp somewhere here in this forum. Does anyone know how to translate it to VBA code? Thanks ;;********************************************* ;; ;; Created: Author Unknown. ;; ;; ;**************NEW ROTATE********************** ; ;;; Command Line Syntax: RT ;;; Use this routine to change the angle of the crosshairs, ;;; by clicking on an object that is at the desired angle or ;;; by entering an angle of degrees at the command line. ;;; A positive number turns the crosshairs counter-clockwise. ;;; A negative number turns the crosshairs clockwise. ; (defun c:rt ( / r e p1 p2) (graphscr) (initget "Entity") (setq r (getangle "\nSnap rotation angle/<Entity>: ")) (cond ( (numberp r) (setvar "snapang" r)) ( (and (or (not r) (eq r "Entity")) (setq e (entsel)) (setq p1 (osnap (cadr e) "qui,end")) (setq p2 (osnap (cadr e) "qui,mid"))) (setvar "snapang" (angle p1 p2))) (t (princ "\nInvalid selection."))) (princ) ) ;;; ;;; Quote
Recommended Posts
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.