Author Topic: Fillet with Autolisp  (Read 1745 times)

0 Members and 1 Guest are viewing this topic.

tgibbo

  • Guest
Fillet with Autolisp
« on: March 26, 2016, 03:25:45 AM »
Can somebody please help me this little problem???
Towards the bottom of the code is the FILLET command. I can't get it too work. Everything before and after this line works fine.

Code: [Select]
(defun c:qqq (/ a BarLength InsertPoint FirstBar SecondBar FirstLine
                SecondLine ThirdLine FourthLine)
(savevartoold) (reobarlayer) (setvar "Osmode" 1) (setvar "orthomode" 0)
    (setq BarLength (getreal "\nEnter New Bar Length or Use <500>"))
    (setq a "T")
    (while a
    (setvar "osmode" 1)
    (setq InsertPoint (getpoint "\nSelect Insertion Corner:"))
    (initget 33) (setvar "osmode" 513)
    (setq FirstBar (getpoint InsertPoint "\nFirst corner bar direction:")
         SecondBar (getpoint InsertPoint "\nSecond corner bar direction:"))
(progn
     (command ".pline" InsertPoint FirstBar "")
     (setq FirstLine (entlast))       
     (command ".lengthen" FirstLine  "T" 500 FirstBar ""
              ".offset" 25 FirstLine SecondBar "")
     (setq ThirdLine (entlast)))
(progn
     (command ".pline" InsertPoint SecondBar "")
     (setq SecondLine (entlast))
     (command ".lengthen" SecondLine "T" 500 SecondBar ""
              ".offset" 25 SecondLine FirstBar "")
     (setq FourthLine (entlast)))
(progn
     (command ".fillet" ThirdLine FourthLine                        ;THIS IS THE COMMAND LINE I'M HAVING TROUBLE WITH;
              ".lengthen" "T" 500 ThirdLine FourthLine ""
              ".erase" FirstLine SecondLine ""))   
     (if (= FirstPoint "") (setq a nil))
    )
   (resetoldvar)     
  (princ)   
 )

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2145
  • class keyThumper<T>:ILazy<T>
Re: Fillet with Autolisp
« Reply #1 on: March 26, 2016, 04:45:54 AM »
I think you'll have success if the lines you are filleting are LINES , not PLINES.


added:
and welcome to theSwamp :)
« Last Edit: March 26, 2016, 04:51:13 AM by kdub »
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

ChrisCarlson

  • Guest
Re: Fillet with Autolisp
« Reply #2 on: March 28, 2016, 09:49:52 AM »
Couple issues

1) savevartoold is not a defined function
2) You never set the variable "filletrad". It's a drawing specific variable that should be set somewhere in your code before performing the fillet.
3) I'd either drop the fillet and just make a single polyline from the beginning, offset then delete or use the join command to join the two line segments then offset and delete.