Jump to content

Layout Tab Limit exceed


pmadhwal7

Recommended Posts

Today i noticed that autocad have only 255 layout limit, and now problem is renaming the tabs i have to make 100 more layouts and if i rename it manually it will take time so i want to  ask is their any fat way to rename layouts after 255 sheet's like 256,257,258 etc from 1 to 255 sheets I changed from Lisp , but if I run this lisp in on other sheets, then they will rename them 1-255 again.

Annotation 2020-07-03 160201.jpg

Link to comment
Share on other sites

5 hours ago, pmadhwal7 said:

Today i noticed that autocad have only 255 layout limit, and now problem is renaming the tabs i have to make 100 more layouts and if i rename it manually it will take time so i want to  ask is their any fat way to rename layouts after 255 sheet's like 256,257,258 etc from 1 to 255 sheets I changed from Lisp , but if I run this lisp in on other sheets, then they will rename them 1-255 again.

Annotation 2020-07-03 160201.jpg

 

Is this a *.lsp lisp or a *fas or *vlx. If the former then there must be a counter somewhere in the lisp that enables it to start at one. Change the initial value to whatever you want, or attach it.

Link to comment
Share on other sites

If you look at this (setq num (vla-get-count (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))))) it will tell you how many layouts, note you need to subtract 1 as "Model" is included.

 

Link to comment
Share on other sites

6 hours ago, BIGAL said:

If you look at this (setq num (vla-get-count (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))))) it will tell you how many layouts, note you need to subtract 1 as "Model" is included.

 

 

or simply

(setq num (length (layoutlist)))

 

Link to comment
Share on other sites

18 hours ago, dlanorh said:

 

Is this a *.lsp lisp or a *fas or *vlx. If the former then there must be a counter somewhere in the lisp that enables it to start at one. Change the initial value to whatever you want, or attach it.

here it is...

Rename layouts.lsp

Link to comment
Share on other sites

(defun c:ren (/ n a i l p x)
(if (setq n (getint "\nEnter Start number: "))
  (progn
   	(vlax-for x (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))
	  	(setq l (cons x l)))
	(setq l (cdr (vl-sort l '(lambda (a b) (< (vla-get-taborder a) (vla-get-taborder b))))))
	(setq i 0)
	(foreach x l (setq i (1+ i)) (vla-put-name x (strcat "FooTempBazoom_" (itoa i))))
  	(setq a (strlen (itoa (length l))))
	  (foreach x l
	    (setq p "")
	    (repeat (- a (strlen (itoa i)))
	      		(setq p (strcat p "0")))
	    (vla-put-name x (strcat p (itoa n)))
	    (setq n (1+ n))
	  )
    )
  )
  (princ)
)
(vl-load-com)

"FooTempBazoom_"  <--- This is hilarious 😄

 

Link to comment
Share on other sites

1 hour ago, pBe said:

(defun c:ren (/ n a i l p x)
(if (setq n (getint "\nEnter Start number: "))
  (progn
   	(vlax-for x (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))
	  	(setq l (cons x l)))
	(setq l (cdr (vl-sort l '(lambda (a b) (< (vla-get-taborder a) (vla-get-taborder b))))))
	(setq i 0)
	(foreach x l (setq i (1+ i)) (vla-put-name x (strcat "FooTempBazoom_" (itoa i))))
  	(setq a (strlen (itoa (length l))))
	  (foreach x l
	    (setq p "")
	    (repeat (- a (strlen (itoa i)))
	      		(setq p (strcat p "0")))
	    (vla-put-name x (strcat p (itoa n)))
	    (setq n (1+ n))
	  )
    )
  )
  (princ)
)
(vl-load-com)

"FooTempBazoom_"  <--- This is hilarious 😄

 

 

Great working fine many thanks................................. :)

 

 

Link to comment
Share on other sites

You may want the D01-D09 as layout names as well.

 

; if less than 10
    (if (< (car dwgnum) 10.0) 
      (setq newstr2 (strcat dwgname "-D0"  (rtos sheetnum 2 0)))
      (setq newstr2 (strcat dwgname "-D"  (rtos sheetnum 2 0)))
    )

 

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