Message 1 of 3
Get info about current SNAPANG value - error 'bad argument type: FILE'

Not applicable
02-03-2015
07:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
recently I worked a lo about lisps based on SNAPANG command
(see here:
)
and I wrote a lisp which inform in the CommandLine about the current SNAPANG value (it is NGINF1). But it failed to work properly. So I modified it and get NGINF2.
So I did in the case of HNGINF here:
- I also converted the angle in radians to degrees.
But this time, in the case of NGINF2, it doesn't work.
There is error in CommandLine - how looks prompt about this error like, is in the lisp code below.
;Command: NGINFRAD ;; error: bad argument type: FILE 0.611994 ; gives result in Radians (defun c:NGINF1 (/ CurAng) (setq CurAng (getvar "SNAPANG")) (princ "\nCurrent SNAPANG value is equal to: " CurAng) ) ;--- ;Command: NGINF ;; error: bad argument type: FILE ; gives good result in decimal Degrees (defun c:NGINF2 (/ CurAngRad CurAng) (setq CurAngRad (getvar "SNAPANG")) (setq CurAng (* (/ 180 PI) CurAngRad)) (princ "\nCurrent SNAPANG value is equal to: " CurAng) )
Could you please tell me what is wrong? What should I change?