Rotating object using two parameters. North Arrow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey there,
I am trying to write a .lisp to automatically rotate my north arrow in paper space, to represent the north (viewtwist) of the modelspace. I have been able to get the two values i need, but need some help in using one value to change the other (objects rotation).
I have managed to get the following and would like the first lisp, to be the rotation value for the second code (the handent of the north arrow).
If someone can help link these two together that would be great!
Thanks.
;get viewtwist value/angle
(defun c:vt()
(setq viewtwist(* (getvar"viewtwist") (/ 180.0 3.1415)))
)
;returns the the viewtwist angle in degrees.
;show arrow 50 value
(defun c:arsel()
(setq arrowsel(entget (handent "202c938")))
(setq arrowdir (assoc 50 arrowsel))
)
;returns the the arrow's angle in radians.