Jump to content

Number of sheet in TITLE BLOCK


Recommended Posts

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

Link to comment
Share on other sites

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.

 

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

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