Author Topic: POLARANG and SNAPSTYL  (Read 2789 times)

0 Members and 1 Guest are viewing this topic.

StykFacE

  • Guest
POLARANG and SNAPSTYL
« on: January 23, 2008, 12:00:09 PM »
Trying to do a quick LISP file to set my Snap/Polar Angle settings on the fly for when I do ISOMETRIC drawings. I figured it would be extremely simple, but guess not. Need a little advice:

Code: [Select]
(defun C:ISO (/)

    (set POLARANG 30)
    (set SNAPSTYL 1)

)

Figured this would be all I needed to do... What am I missing? Thanks gusy.  :kewl:

Guest

  • Guest
Re: POLARANG and SNAPSTYL
« Reply #1 on: January 23, 2008, 12:07:05 PM »
set should be setvar   :wink:

StykFacE

  • Guest
Re: POLARANG and SNAPSTYL
« Reply #2 on: January 23, 2008, 12:27:37 PM »
Ah, forgot about that one. Got it, but it makes my Polar Angle 278.8733853924698. Any idea?

Updated code:
Code: [Select]
(defun C:ISO (/)

    (setvar "POLARANG" 30)
    (setvar "SNAPSTYL" 1)

 )

Guest

  • Guest
Re: POLARANG and SNAPSTYL
« Reply #3 on: January 23, 2008, 12:30:40 PM »
Right off the top of my head, not sure.
But you can change it to (command "polarang" "30") and it will work.


*runs off to research polarang*

StykFacE

  • Guest
Re: POLARANG and SNAPSTYL
« Reply #4 on: January 23, 2008, 12:35:06 PM »
awesome Matt thanks again bud!! worked perfect. ;-)

Guest

  • Guest
Re: POLARANG and SNAPSTYL
« Reply #5 on: January 23, 2008, 12:43:23 PM »
You're welcome.

And I found that POLARANG is in radians, not degrees.  So doing (setvar "polarang"

Code: [Select]
(defun DegreesToRadians (numberOfDegrees)
   (* pi (/ numberOfDegrees 180.0))
)

(defun C:ISO (/)
   (setvar "POLARANG" (DegreesToRadians 30))
   (setvar "SNAPSTYL" 1)
)