Jump to content
ryankevin15

Numbering equipment with text LSP

Recommended Posts

ryankevin15

Hello,

 

Does anyone know of a LSP out there that will number the selection below properly without editing each piece of text?

 

Rz677qP.png

Share this post


Link to post
Share on other sites
ryankevin15

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!

Share this post


Link to post
Share on other sites
Steven P

To create an array and increment each number then look at Lee Macs INCARRAY lisp and INCARRAYD

Share this post


Link to post
Share on other sites
Steven P

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

Share this post


Link to post
Share on other sites
ryankevin15

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.

Share this post


Link to post
Share on other sites
ryankevin15

tcount works great. thanks!

Share this post


Link to post
Share on other sites
ronjonp

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

Share this post


Link to post
Share on other sites
Lee Mac

There's also this.

Share this post


Link to post
Share on other sites
BIGAL

If you use annotative text an option is set angle to view so if you rotate what you have the text will rotate back to horizontal.

Share this post


Link to post
Share on other sites
himal

Very Nice Program Mr Lee :thumbsup::thumbsup::D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×