Jump to content

Select all polylines of certain layer and fillet them ?


John Camper

Recommended Posts

How to select all polylines of certain layer(Eg: "Walls") and fillet them with (0.25) radius .I am just new at this lisp scene so any help would be appreciated.Below is the separate code that selects all elements of layer and  another code fillets all selected polylines.How can i combine these two to create a single lisp for certain layer("walls") and (0.25) fillet.

(defun c:SALL ()
 (setq TargEnt (car (entsel "\nSelect object on layer to select: ")))
 (setq TargLayer (assoc 8 (entget TargEnt)))
 (sssetfirst nil (ssget "_X" (list TargLayer)))
 (princ)
)


(defun C:FMP ; = Fillet Multiple Polylines
  (/ plss n)
  (if (setq plss (ssget "_:L" '((0 . "LWPOLYLINE"))))
    (repeat (setq n (sslength plss))
      (command "_.fillet" "_polyline" (ssname plss (setq n (1- n))))
    ); repeat
  ); if
  (princ)
); defun

 

Link to comment
Share on other sites

;;;https://www.theswamp.org/index.php?topic=56258.0
;; @Tharwat
(defun c:Test (/ int sel ent)
  (and
    (or (/= 4
            (logand 4
                    (cdr (assoc 70 (entget (tblobjname "LAYER" "wall"))))
            )
        )
        (alert "Layer name <wall> is locked ! unlock then try again"
        )
    )
    (setq int -1
          sel (ssget "_X"
                     (list '(0 . "LWPOLYLINE")
                           '(8 . "wall")
                           (cons 410 (getvar 'CTAB))
                     )
              )
    )
    (setvar 'FILLETRAD 0.25)
    (while (setq int (1+ int)
                 ent (ssname sel int)
           )
      (command "_.FILLET" "_Polyline" ent)
    )
  )
  (princ)
)

 

  • Thanks 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...