Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
leothebuilder
Posts: 481
Registered: ‎07-05-2010
Message 1 of 4 (235 Views)
Accepted Solution

Turn a line into a polyline and do a zero fillet

235 Views, 3 Replies
01-18-2013 11:18 AM

I have a lips that creates a zero radius fillet.

(defun c:FZ  () (setvar "FILLETRAD" 0)(command "_.fillet" "multiple"))

This works great.

I would like to expand this by turning the line into a polyline....but am stuck on how to achieve this.

maybe this one ...

 

(defun c:FZ (/ obj1 obj2)
(setvar "FILLETRAD" 0)
(if (and (progn (prompt "\n Select First line :")
(setq obj1 (ssget "_+.:s" '((0 . "LINE"))))
)
(progn (prompt "\n Select Second line :")
(setq obj2 (ssget "_+.:s" '((0 . "LINE"))))
)
)
(progn
(command "_.fillet" obj1 obj2 "")
(command "_.pedit" "_m" obj1 obj2 "" "_join" "" "")
)
)
(princ)
)

 

Distinguished Mentor
_Tharwat
Posts: 632
Registered: ‎07-02-2010
Message 2 of 4 (228 Views)

Re: Turn a line into a polyline and do a zero fillet

01-18-2013 11:51 AM in reply to: leothebuilder

maybe this one ...

 

(defun c:FZ (/ obj1 obj2)
  (setvar "FILLETRAD" 0)
  (if (and (progn (prompt "\n Select First line :")
                  (setq obj1 (ssget "_+.:s" '((0 . "LINE"))))
           )
           (progn (prompt "\n Select Second line :")
                  (setq obj2 (ssget "_+.:s" '((0 . "LINE"))))
           )
      )
    (progn
      (command "_.fillet" obj1 obj2 "")
      (command "_.pedit" "_m" obj1 obj2 "" "_join" "" "")
    )
  )
  (princ)
)

 

____________________________________________________
Get learn and learn and practice , to become experienced guy .
*Expert Elite*
leothebuilder
Posts: 481
Registered: ‎07-05-2010
Message 3 of 4 (225 Views)

Re: Turn a line into a polyline and do a zero fillet

01-18-2013 11:59 AM in reply to: leothebuilder

That worked like a charm !!

 

Thanks

Distinguished Mentor
_Tharwat
Posts: 632
Registered: ‎07-02-2010
Message 4 of 4 (220 Views)

Re: Turn a line into a polyline and do a zero fillet

01-18-2013 12:01 PM in reply to: leothebuilder

You're welcome .

____________________________________________________
Get learn and learn and practice , to become experienced guy .
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!