Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am running CAD 2025, but the lisps I have were from 2026. There were a few minor changes I needed to make but overall everything was working fine.
All of a sudden, my master lisp file isn't working. For example, I have two lisps - TQP and TQP24. Only the first one will run.
Some lisp routines are singular (such as TWIST). However, it doesn't work if the lisp is in the master lsp file. If I copy and paste into its own .lsp and appload it will work. It's driving me nuts, I use this all the time.
See below - the end of one lisp to the beginning of the next one.
princ)
)
;****************************************************************************
; -----TW----- DVIEW TWIST
;****************************************************************************
;;; LISP uses two points or an input angle to
;;; twist the current view using the the dview command.
;;; the snapangle variable is reset to make the cursor
;;; appear horizontal.
;;;;The dtr funtion converts degrees to radians
;;;;The rtd funtion converts radians to degrees
(defun RTD (/ANG) (/ (* ANG 180.0) pi))
(defun DTR (/ANG) (* pi (/ ANG 180.0)))
(defun C:TW (/ P1 P2 ANG)
;;; store the cmdecho, osnapcoord, osmode and orhtomode system varibles
(setq CE-SAV (getvar "cmdecho"))
(setvar "cmdecho" 0)
(setq OSCOORD-SAV (getvar "osnapcoord"))
(setvar "osnapcoord" 1)
(setq ORTHOMODE-SAV (getvar "orthomode"))
(setvar "orthomode" 0)
(princ
"\nTwist view and cursor angle by picking two point or entering an angle
"
) ; _ end ofPRINC
(if (setq P2 (getpoint
"\nFirst point(left) <Press Enter to input an angle>: "
) ; _ end of GETPOINT
) ;_ end of SETQ
(progn (initget 1)
(setq P1 (getpoint "\nSecond point(right): " P2)
ANG (angle P2 P1)
) ;_ end of SETQ
(command "DVIEW" "L" "" "TW" (- 360 (RTD ANG)) "")
(setvar "SNAPANG" ANG)
) ;_ end of PROGN
(progn (setq ANG (getangle "\nAngle: "))
(command "DVIEW" "L" "" "TW" (- 360 (RTD ANG)) "")
(setvar "SNAPANG" ANG)
) ;_ end of PROGN
) ;_ end of IF
(setvar "cmdecho" CE-SAV)
(setvar "osnapcoord" OSCOORD-SAV)
(setvar "orthomode" ORTHOMODE-SAV)
;;; print the rotation angle to the screen: converts string to local units
and
precision
(princ
(strcat "\nTwist angle: "
(angtos ANG (getvar "aunits") (getvar "auprec"))
) ;_ end of strcat
) ;_ end of princ
(princ)
) ;_ end of DEFUN
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DRAWING OPENING ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;THE FOLLOWING IS FOR TOPEN
Solved! Go to Solution.