Jump to content

Recommended Posts

Posted
May be I do somting wrong but after loading this code the command des nor joni is responding

 

Because of the amount of operations involved, it will take a while to execute on large drawings, but it does work fine on my machine.

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • The Buzzard

    7

  • Lee Mac

    6

  • JONI

    6

  • Freerefill

    2

Top Posters In This Topic

Posted Images

  • 2 months later...
Posted

Hi, I am verry happy with your solution and it works verry fine

I have chaged line 9 to (setq count2 count1) and it seems to work faster wen I use more details or more charakters

Im not sure if this is allowed but it seems to be OK.

 

 

Try this.. I keep getting an error, but it keeps working..

 

(defun c:des( / ss count1 count2 chkEnt chk1 chk2 chkNth)
 (setq ss (ssget (list (cons 0 "LINE"))))
 (setq count1 0)
[color=black] (setq count2 0)[/color]
 (repeat (sslength ss)
   (setq chkEnt (ssname ss count1))
   (setq chk1 (cdr (assoc 10 (entget chkEnt))))
   (setq chk2 (cdr (assoc 11 (entget chkEnt))))
   [b][color=#ff0000](setq count2 count1)[/color][/b]
   (while (ssname ss count2)
     (setq chkNth (entget (ssname ss count2)))
     (if (and (equal chk1 (cdr (assoc 11 chkNth)))
          (equal chk2 (cdr (assoc 10 chkNth)))
          (not (equal (assoc -1 (entget chkEnt)) (assoc -1 chkNth)))
          )
       (progn
     (command "erase" chkEnt (ssname ss count2) "")
     (setq ss (ssdel (ssname ss count2) (ssdel chkEnt ss)))
     )
       )
     (setq count2 (1+ count2))
     )
   (setq count1 (1+ count1))
   )
 (princ)
 )

To use it, type the command and you'll be asked to window the selection. Make sure you've already exploded all of it into lines, otherwise you won't get anything.

 

Also, it may lag your system if you have an awful lot of text.. just to warn you ^^'

 

Let me know how it works~

 

EDIT: My error is in the line with the (ssdel). Figures, first time I tried using it. Oh well. It works regardless. Oh, and for a fun time, try text exploding with a Wingdings font. Pretty cool stuff. ^^

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