+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Junior Member
    Using
    AutoCAD 2006
    Join Date
    Dec 2009
    Location
    PL
    Posts
    16

    Default Number of sheet in TITLE BLOCK

    Registered forum members do not see this ad.

    Dear All,
    I have small issue here which bother me a lot during my Acad activity.
    Is there a simple way to insert "Field" with number of following sheet in project?
    For now I am doing it "by-hand" and having 20-50sheets in file such option would save me a lot of time. Please find picture below.
    AutoCAD 2011 - [186_Bucher Luis v.4.jpg
    Thanks,
    Pete

  2. #2
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,892

    Default

    Can be done simply by counting the number of layouts then just step through and change the 1 attribute in the title block on each layout. Others will advise how to do in sheet sets.

    Code:
    ;this is ;this is bits put together not tested
    (vl-load-com) 
    (setq Doc (vla-get-ActiveDocument (vlax-get-Acad-Object)))
    
    (setq LoCol (vla-get-Layouts Doc))
    
    (setq numlay (- (vla-get-Count LoCol) 1) ;need -1 to remove model
    (
    setq oldtag1 "Total sheet") ; attribute tag name total sheet
    (setq ss1 (ssget "x"  '((0 . "INSERT") (2 . "Titleblockname"))))
    
    (setq inc (sslength ss1))
    (repeat inc      
    (foreach att (vlax-invoke (vlax-ename->vla-object (ssname SS1 (setq inc (1- inc)) )) 'getattributes)
    (if (= oldtag1 (strcase (vla-get-tagstring att)))
    (vla-put-textstring att numlay) 
    ) ; end if
    )
    A man who never made mistakes never made anything

  3. #3
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    4,008

    Default

    Registered forum members do not see this ad.

    If you will include the page number in layouts naming may adapt one of the Diesel expressions proposed here.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

Similar Threads

  1. Sheet Set Manager Title Block Problem
    By RyGuy in forum AutoCAD LT
    Replies: 6
    Last Post: 11th Jul 2014, 06:19 pm
  2. Replies: 0
    Last Post: 14th Jul 2013, 10:34 am
  3. How to populate block attribute (text) from title sheet data ?
    By milldew in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 29th Apr 2011, 03:39 am
  4. How to extract and link title sheet block attributes to spreadsheets
    By kheajohn in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 8th Sep 2010, 11:46 am
  5. How do i make a title block w/updated sheet numbers
    By Frank the Frowner in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 20th Feb 2007, 08:11 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts