Command: ROTATEUCS
This functionrotates User Coordinate System to the user defined angle.
Code:
;;; =========================================
;;; ROTATE_UCS_v1.LSP
;;;
;;; Written by: Andrzej Kalinowski, 27.04.2016
;;;
;;; Command:
;;; ROTATEUCS - rotates UCS to the user defined angle
;;;
;;; =========================================
;;; NN
;;; =========================================
(defun C:ROTATEUCS (/ ang1)
(command "_UCS" "_W")
(command "_snapang" 0)
(setq ang1 (* (getangle) (/ 180 pi)));degrees to radians
(command "_UCS" "_Z" ang1)
(princ (strcat "\nAngle of UCS: "( rtos ang1 2 2) ) )
(princ)
);defun
Example:
Download file: ROTATE_UCS_v1.FAS

No comments:
Post a Comment