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 (239 Views)
Accepted Solution

Turn a line into a polyline and do a zero fillet

239 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: 643
Registered: ‎07-02-2010
Message 2 of 4 (232 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 (229 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: 643
Registered: ‎07-02-2010
Message 4 of 4 (224 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
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.