Jump to content

Trim lines around text - help


flopo

Recommended Posts

Hi guys,

I need a lisp to l trim lines around texts - at a given value - to work this way: select texts or mtexts, insert value for distance around text, and trim all lines that intersect all texts and mtexts selected . Something like background mask , but with trim. Thanks!

Link to comment
Share on other sites

I choose to beg your pardon, Lee :cry:.

ROFL. Best language barrier mix-up ever.

 

Only because I wrote this a year ago...only designed to work with circles....

 

(defun c:CIT (/ ss)
 ;; Trim Inside of selected Circles
 ;; Required subroutines: etrim (from Express Tool: EXTrim.LSP)
 ;; Alan J. Thomspon, 12.22.10
 (if (or etrim (load "extrim.lsp" nil))
   (if (setq ss (ssget '((0 . "CIRCLE"))))
     ((lambda (i / e)
        (while (setq e (ssname ss (setq i (1+ i))))
          (etrim e (cdr (assoc 10 (entget e))))
        )
      )
       -1
     )
   )
   (alert "Express Tool: EXTrim required!")
 )
 (princ)
)

Link to comment
Share on other sites

  • 6 years later...

Hey alanjt, how difficult is it to get this working with rectangles/polylines?

 

I tried replacing "CIRCLE" with "POLYLINE" but that didn't work... Seemed too basic haha

 

ROFL. Best language barrier mix-up ever.

 

Only because I wrote this a year ago...only designed to work with circles....

 

(defun c:CIT (/ ss)
 ;; Trim Inside of selected Circles
 ;; Required subroutines: etrim (from Express Tool: EXTrim.LSP)
 ;; Alan J. Thomspon, 12.22.10
 (if (or etrim (load "extrim.lsp" nil))
   (if (setq ss (ssget '((0 . "CIRCLE"))))
     ((lambda (i / e)
        (while (setq e (ssname ss (setq i (1+ i))))
          (etrim e (cdr (assoc 10 (entget e))))
        )
      )
       -1
     )
   )
   (alert "Express Tool: EXTrim required!")
 )
 (princ)
)

Link to comment
Share on other sites

  • 2 weeks later...

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...