AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

Reply
Contributor
Misfittoy
Posts: 11
Registered: ‎03-17-2009
Message 1 of 7 (2,970 Views)

Auto update page numbers

2970 Views, 6 Replies
06-08-2012 06:44 AM

I am setting up a template and want my page #s to automatically update when i copy a tab. How is this done? I currently have my "Total Sheets" as a field and that works out fine but often need to add/ remove a sheet to/from drawing and would like the page #s to update.

Thank you 

Valued Contributor
wolfgrrl
Posts: 62
Registered: ‎04-29-2008
Message 2 of 7 (2,954 Views)

Re: Auto update page numbers

06-11-2012 05:04 AM in reply to: Misfittoy

Try looking at this:

 

http://heidihewett.blogs.com/my_weblog/2006/03/sheets_happen_s_4.html

 

I am unable to view this at work, but it may be what you need.

 

This looks promising as well....

 

http://www.cadtutor.net/forum/showthread.php?11537-Good-Question-Layout-names-and-fields&p=64089#pos...

Autocad Mechincal 2012 on Windows 7 64-bit
*Expert Elite*
rkmcswain
Posts: 3,346
Registered: ‎11-13-2006
Message 3 of 7 (2,940 Views)

Re: Auto update page numbers

06-11-2012 10:28 AM in reply to: Misfittoy

We wrote our own routine to do this.

It renumbers the sheets (from 1 to n) in SSM and updates the "TotalSheets" custom field.

 

Nothing built into AutoCAD to do this.

Contributor
Misfittoy
Posts: 11
Registered: ‎03-17-2009
Message 4 of 7 (2,928 Views)

Re: Auto update page numbers

06-12-2012 06:15 AM in reply to: Misfittoy

Thank you for the responses.

Do you have/did you write a field code for this?

We do not use sheet sets in our drawings,so i am looking for a way to automatically update  page numbers. As seen in the image, the "TOTAL SHEETS" is a field which i update from properties manager. I would like to find a solution to the "SHEET NO." that if i copy/add or delete a tab this number updates. Possible?

 

 

sheet #.gif 

*Expert Elite*
rkmcswain
Posts: 3,346
Registered: ‎11-13-2006
Message 5 of 7 (2,926 Views)

Re: Auto update page numbers

06-12-2012 06:40 AM in reply to: Misfittoy

Misfittoy wrote:

We do not use sheet sets in our drawings.....

I would like to find a solution to the "SHEET NO." that if i copy/add or delete a tab this number updates. Possible?

 


Sounds like you'll need a reactor that periodically polls the number of layout tabs and updates the field accordingly.

Sorry, I don't know of any existing tool that does this

 

Short of using a reactor, you could use a lisp function like below, and then point your Field to the lisp variable. Of course you have to execute the lisp statement to update the variable, which in turn will update the field. You could piggy back this code inside a shortcut to a command you use often (such as LINE, ERASE, QSAVE)

 

; this lisp statement will return the 
; number of layouts in the current drawing
; and set the result to a lisp variable named mytotalsheets
(setq mytotalsheets (length (layoutlist)))

; example of the piggy back idea
(defun C:E ()
 (setq mytotalsheets (length (layoutlist)))
 (command "._erase")
) 
Product Support
Shawn_Niles
Posts: 251
Registered: ‎12-02-2008
Message 6 of 7 (2,915 Views)

Re: Auto update page numbers

06-12-2012 12:46 PM in reply to: rkmcswain

Great suggestions here everyone. Please click on 'Accept as Solution' for any posts that will help to solve this for you.



Shawn Niles
Valued Mentor
tim.turner
Posts: 1,669
Registered: ‎04-26-2005
Message 7 of 7 (2,904 Views)

Re: Auto update page numbers

06-13-2012 05:43 AM in reply to: Misfittoy

It is not totally automatic but if you want to standardize your tab names you can pull certain parts of the tab name into a field with diesel. Our tabs begin with SH 1, SH 2, SH 2A etc. The field in the title block has this diesel string: $(substr,$(getvar,ctab), 4,2) which pulls the 4th and 5th characters. You can adjust the numbers to pull whatever part of the tab name you want.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.