• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD 2010/2011/2012 DWG Format

    Reply
    Contributor
    Posts: 11
    Registered: ‎03-17-2009

    Auto update page numbers

    877 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 

    Please use plain text.
    Valued Contributor
    Posts: 62
    Registered: ‎04-29-2008

    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
    Please use plain text.
    *Expert Elite*
    rkmcswain
    Posts: 1,357
    Registered: ‎11-13-2006

    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.

    Please use plain text.
    Contributor
    Posts: 11
    Registered: ‎03-17-2009

    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 

    Please use plain text.
    *Expert Elite*
    rkmcswain
    Posts: 1,357
    Registered: ‎11-13-2006

    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")
    ) 
    
    Please use plain text.
    Product Support
    Posts: 197
    Registered: ‎12-02-2008

    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
    Product Support Team Lead
    Product Support
    Autodesk, Inc.
    Please use plain text.
    Valued Mentor
    Posts: 1,656
    Registered: ‎04-26-2005

    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.

    Please use plain text.