Jump to content

Numbering equipment with text LSP


ryankevin15

Recommended Posts

Also, anyone know if a way where you could rotate the entire selection by 90 degrees and the text rotates with it? Would want that as a totally separate LSP if possible. thanks!

Link to comment
Share on other sites

as for your second question, I depends how many times you need to do this, I would just rotate it and use the properties menu to set the text rotation.. but there might be a smart way to do all that in one go

Link to comment
Share on other sites

Not what I was looking for but thanks for the response.

 

I am looking for a LISP where I select all the text objects and it can order them from the first number to the last text object in increments of one. I do not like arrays.

Link to comment
Share on other sites

Here's another:

(defun c:number	(/ i s)
 (setq i 0)
 (if (and (setq s (ssget ":L" '((0 . "text")))))
   (foreach e
     (vl-sort (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
	      '(lambda (a b) (> (caddr (assoc 10 (entget a))) (caddr (assoc 10 (entget b)))))
     )
     (entmod (append (entget e) (list (cons 1 (itoa (setq i (1+ i)))))))
   )
 )
 (princ)
)

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