PDA

View Full Version : Age old Fillet routine isn't working anymore


pauljordan
2009-03-26, 07:05 PM
I don't quite remember when this routine quit working as I haven't used it in a while but, it's been a part of my .lsp routine for almost 20 years.

It's a simple fillet command that sets the radius to zero, about as simple as you can get.

(defun C:F0()
(command "Fillet" "R" "0")
)

Can anyone tell me what changes Autocad has made that prevent this from working??

I know there are a couple of alternatives out there now but, this one is as comfortable as an old shoe the dog has chewed on..

Tom Beauford
2009-03-26, 07:51 PM
Maybe related: http://forums.augi.com/showthread.php?t=87490#6

Just hold down the shift key while selecting lines with the fillet command and it will use 0 as the radius.

pauljordan
2009-03-26, 08:13 PM
The shift key definitely works, just kinda miss the old ways..

The ^r is a little difficult to add to that lisp routine.

Thanks for the help.

icbinr
2009-03-26, 08:21 PM
Or if you are just dead set on using lisp to do this.


(defun C:F0 ( / frad)
(setq frad (getvar "FILLETRAD"))
(setvar "FILLETRAD" 0.0)
(command "._FILLET" PAUSE PAUSE)
(setvar "FILLETRAD" frad)
(princ)
)


Will do it and reset your fillet radius to whatever it was before. Personally I find it easier to just hold down shift.

pauljordan
2009-03-26, 08:51 PM
I just never have been a tool bar user.. Just ask Jack Foster.. haha.. He and I were in the same users group together for 7 years. Someone would ask how to make a command do something, I'd give the answer in lisp and he's do it in toolbar..

I like the idea of the setq in there too.. I've done that for several routines, just never thought of doing it for my fillet command.

Nice touch and thanks!

RobertB
2009-03-26, 10:04 PM
I don't quite remember when this routine quit working as I haven't used it in a while but, it's been a part of my .lsp routine for almost 20 years.

It's a simple fillet command that sets the radius to zero, about as simple as you can get.

(defun C:F0()
(command "Fillet" "R" "0")
)

Can anyone tell me what changes Autocad has made that prevent this from working??

I know there are a couple of alternatives out there now but, this one is as comfortable as an old shoe the dog has chewed on..Check into the new (as of 2009) function initcommandversion.

BoKirra
2009-03-27, 12:13 AM
I don't quite remember when this routine quit working as I haven't used it in a while but, it's been a part of my .lsp routine for almost 20 years.

It's a simple fillet command that sets the radius to zero, about as simple as you can get.

(defun C:F0()
(command "Fillet" "R" "0")
)

Can anyone tell me what changes Autocad has made that prevent this from working??

I know there are a couple of alternatives out there now but, this one is as comfortable as an old shoe the dog has chewed on..
New shoe with "" ;)

(defun C:F0()
(command "Fillet" "R" "0" "")
)

That was the trick.

prose
2009-04-01, 10:43 PM
Or if you are just dead set on using lisp to do this.


(defun C:F0 ( / frad)
(setq frad (getvar "FILLETRAD"))
(setvar "FILLETRAD" 0.0)
(command "._FILLET" PAUSE PAUSE)
(setvar "FILLETRAD" frad)
(princ)
)


Will do it and reset your fillet radius to whatever it was before. Personally I find it easier to just hold down shift.

This one is similar but doesn't just pause twice, it creates a loop until two objects are selected. It also puts the second selected layer on the first selected layer.


;;;---------------------------------------------
;;;Creates a 0" Fillet putting objects on first selected layer
;;;
(defun C:fillet2 (/ fr s1 s2)
(while (not (setq s1 (ssget ":S")))(princ "\nSelect line to fillet on target layer")
(princ "\nNull Selection please try again: ")
)
(while (not (setq s2 (ssget ":S")))(princ "\nSelect line to fillet to put on target layer")
(princ "\nNull Selection please try again: ")
)
(setq fr (getvar "filletrad"))
(command "matchprop" s1 s2 "") ;comment this out if you dont want then to match layers
(command "fillet" "Radius" "0")
(command "fillet" s1 s2)
(setvar "filletrad" fr)
(prompt "\nFillet and layer change was successful")
(princ)
)