erbalaji Posted February 9, 2016 Posted February 9, 2016 Hi Guys i wrote a lisp and it's working 50% only. could anyone make it work 100%? Thank you.. (defun c:chrec() (setq a (getint "\nEnter x Length: ")) (setq b (getint "\nEnter Y length: ")) (setq c 1500) (setq d 100) (setq p1 '(0 0)) (setq p2 (polar p1 0 a)) (setq p3 (polar p2 (/ pi 2) b)) (setq p4 (polar p3 (/ pi 1) a)) (setq p5 (polar p4 (/(* pi 3) 2) b)) (command "Line" p1 p2 "") (setq et1 (ssget "L" )) (command "Line" p2 p3 "") (setq et2 (ssget "L" )) (command "Line" p3 p4 "") (setq et3 (ssget "L" )) (command "Line" p4 p5 "") (setq et4 (ssget "L" )) (command "Chamfer" "distance" c d et1 et2 "") (command "Chamfer" "" et4 et1 "") (princ) ) Quote
Lee Mac Posted February 9, 2016 Posted February 9, 2016 You will need to account for active Object Snap modes when supplying point input to commands through AutoLISP. To do this, either temporarily disable Object Snap or prefix the point input with the "_non" command modifier to instruct the command to ignore all active Object Snap modes for the next point input, e.g.: (command "_.line" "_non" p1 "_non" p2 "") To understand the effect of the other command prefixes, read the first section of my tutorial here. 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.