QUICK_PLAN_v1_01...........................................free

Command: QPLAN

This function rotates view to a specified angle. Function should be used in Top View

 

Code:

;;; ================================================
;;;        QUICK_PLAN_v1_01.LSP     
;;;
;;;        Written by Andrzej Kalinowski,     www.autolisps.blogspot.com
;;;        v1.00 - 27.04.2016
;;;        v1.01 - 13.10.2018 - adding UCS restoration
;;;
;;;        COMMAND:    QPLAN
;;;                    This function rotates view to a specified angle. Function should be used in Top View
;;; ================================================
(defun C:QPLAN (/ ang1 old_cmdecho)
    (setq old_cmdecho (getvar "CMDECHO"))
    (setvar "CMDECHO" 0)
    (command "_UCS" "_NA" "_D" "old_ucs1")
    (command "_UCS" "_NA" "_S" "old_ucs1");naming current UCS
    (command "_UCS" "_W")
    (setq ang1 (* (getangle) (/ 180 pi)))
    (command "_UCS" "_Z" ang1)
    (command "_plan" "_C")
    (command "_UCS" "_NA" "_R" "old_ucs1"); restoring UCSr
    (command "_UCS" "_NA" "_D" "old_ucs1")
    (setvar "CMDECHO" old_cmdecho)
 (princ) 
);defun


Example:

Download file: QUICK_PLAN_v1_01.FAS

No comments:

Post a Comment