Dayananda Posted January 22, 2020 Posted January 22, 2020 Can we add the right click option to the lisp program? Quote
rlx Posted January 22, 2020 Posted January 22, 2020 you would need the GRREAD function. Just a simple example : (defun c:rotdwg ( / inp) (princ "\nRotate drawing +90 gr. (+ or LMouse) or back -90 gr. (- or RMouse) : ") (setq inp (grread)) (if (or (equal (car inp) 25) (equal inp (list 2 45))) ; right mousebutton or '-' (vl-catch-all-apply 'vl-cmdf (list ".move" "all" "" "0,0" "@-285,-1.25" ".rotate" "all" "" "5,5" "-90")) (vl-catch-all-apply 'vl-cmdf (list ".rotate" "all" "" "5,5" "90" ".move" "p" "" "0,0" "@285,1.25"))) (vl-catch-all-apply 'vl-cmdf (list ".zoom" "all")) (princ) ) 1 Quote
pkenewell Posted January 22, 2020 Posted January 22, 2020 (edited) Another method: Observe the following for a right mouse button context menu in a simple (getxx) call. Paste this in at the command prompt, then right click in the graphics screen. (initget "One Two Three") (setq opt (Getkword "\nSelect Option [One/Two/Three]: ")) ; Putting the Keywords in [] tells AutoLISP to make a context Menu. Edited January 22, 2020 by pkenewell 1 Quote
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.