Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple fillet - Radius 0 / Radius (value)

22 REPLIES 22
SOLVED
Reply
Message 1 of 23
Lukasvop1
894 Views, 22 Replies

Multiple fillet - Radius 0 / Radius (value)

Hi guys, can you write 2 simple lisps that allow quick Multiple Fillet

(I mean without pressing enter after use command Fillet) (in 2D/3D) :


F0 - Multiple - Fillet - Radius [0]
FR - Multiple - Fillet - Radius [User_add_value]

 

Multiple filler F0, FR.png

22 REPLIES 22
Message 21 of 23
Lukasvop1
in reply to: komondormrex

Ou man, this is like virus.. I can't escape the lisp. Esc/Enter not working. I must exit Autocad by windows task manager..

Message 22 of 23
komondormrex
in reply to: Lukasvop1

oops, i got it the same on the other version.

these ones stops on the Esc.

 

(defun c:f0 nil
	(setvar 'filletrad 0)
	(while (null (command "_fillet" pause pause)))
)

(defun c:fr (/ radius)
  	(if (setq radius (if (null radius) 
						(getreal (strcat "\nEnter radius to fillet with <" (rtos (getvar 'filletrad)) ">: ")) 
						(getvar 'filletrad)
					 )
		)
  		  (setvar 'filletrad radius)
	)
  	(while (null (command "_fillet" pause pause)))
)

updated

 

 

Message 23 of 23
Sea-Haven
in reply to: Lukasvop1

Another just type F123 etc f2 and so on the number is used as the radius for the fillet, note as this uses a reactor catching an error you need to do this for say rad 3.5, f3-5 as the "." is detected in the error trap.

 

Another version is offset and Circles.

 

; Fillet rad uses Frad eg f100 pulls the 100 from the F and then runs fillet
; BY Alan H 2019

(   (lambda nil
        (vl-load-com)
        (foreach obj (cdar (vlr-reactors :vlr-command-reactor))
            (if (= "fillet-reactor" (vlr-data obj))
                (vlr-remove obj)
            )
        )
        (vlr-command-reactor "fillet-reactor" '((:vlr-unknowncommand . fillet-reactor-callback)))
    )
)

(defun filletrad ( / rad)
(setq rad (distof (substr com 2) 2))
            (if (<= 0.0 rad)
              (progn        
              (setvar 'filletrad rad)
              (vla-sendcommand fillet-reactor-acdoc "_.fillet ")
              )
              ) 
)

(defun fillet-reactor-callback ( obj com )
(setq com (vl-string-translate "-" "." (strcase (car com))))
    (cond   
        (   (and
            (wcmatch com "~*[~F.0-9]*")
            (wcmatch com "F*")
            (wcmatch com "~F*F*")
            (wcmatch com "~*.*.*")
            ) ; and
            (filletrad) 
         ) 
    ) ; master cond
) ; defun

(or fillet-reactor-acdoc
    (setq fillet-reactor-acdoc (vla-get-activedocument (vlax-get-acad-object)))
)

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report