Jump to content

Lisp command "fillet" with radius for pline doesn't work !!


LauKwokFai

Recommended Posts

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

Link to comment
Share on other sites

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))
)

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...