LauKwokFai Posted June 14, 2012 Posted June 14, 2012 Hi, I hope this is not a stupid question... I wonder why a simple lisp command line like this doesn't work... Command: (command "fillet" "r" 2 "p" (entsel "\nSelect a polyline : ") ) Unknown command "P". Press F1 for help. Thank you Quote
MSasu Posted June 14, 2012 Posted June 14, 2012 The problem is that AutoLISP is calling the old format of commands; that it, to preserve compatibility with old routines. For your case, the FILLET command ends after fillet radius is set, so need to call it again to apply fillet operation. Also, please check what ENTSEL function return. Adjust your code as below to work: (command "[color=red]_[/color]fillet" "[color=red]_[/color]r" 2 [color=red]"_fillet"[/color] "[color=red]_[/color]p" [color=red](car [/color](entsel "\nSelect a polyline : ")[color=red])[/color]) However, I will write it like: (setvar "FILLETRAD" 2) (if (setq thePline (ssget "_:S" '((0 . "LWPOLYLINE")))) (command "_FILLET" "_P" (ssname thePline 0)) ) 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.