pioptl Posted January 14, 2016 Share Posted January 14, 2016 I have a lisp routine that I use extensively, don't know who wrote it or where it came from but have been using it for 10-15 years. Not real lisp savy so I'm asking if anyone knows why this may work fine in 2015 but not in 20016. When I use it in 2016 it returns "invalid object" every time, no matter what type of object I pick. This lisp simply sets the snapang to the angle of a selected object. Any help would be appreciated, Thanks ;; SNAPANG COMMAND ;; ALIOUS SHORTCUT ; I have no idea who wrote this. (defun C:SX (/ r e p1 p2) (graphscr) (initget "Entity") (setq r (getangle "\nSnap rotation angle/<Entity>: ")) (cond ( (numberp r) (setvar "snapang" r)) ( (and (or (not r) (eq r "Entity")) (setq e (entsel)) (setq p1 (osnap (cadr e) "qui,end")) (setq p2 (osnap (cadr e) "qui,mid"))) (setvar "snapang" (angle p1 p2))) (t (princ "\nInvalid selection."))) (princ) ) Quote Link to comment Share on other sites More sharing options...
GP_ Posted January 14, 2016 Share Posted January 14, 2016 Try it using not "qui,end" / "qui,mid" but rather just "end" / "mid" Quote Link to comment Share on other sites More sharing options...
pioptl Posted January 14, 2016 Author Share Posted January 14, 2016 Thanks GP, Works perfectly! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 14, 2016 Share Posted January 14, 2016 On the same theme, you might find my Cursor Rotate program useful. Quote Link to comment Share on other sites More sharing options...
tombu Posted January 19, 2016 Share Posted January 19, 2016 Try it using not "qui,end" / "qui,mid"but rather just "end" / "mid" While "qui,end,mid" was still recognized in 2015 the "qui" part has been obsolete for many years. "qui,end,mid" & "end,mid" do the same thing in 2015, in 2016 they finally stopped recognizing "qui" as an osnap. May be because OSMODE has been redone when they added the Geometric CEnter osnap. On the same theme, you might find my Cursor Rotate program useful. Nice, I'll add that to my Snap Angle drop-down. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.