waxe Posted August 1, 2014 Share Posted August 1, 2014 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. Thanks, Pete Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 1, 2014 Share Posted August 1, 2014 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 ) Quote Link to comment Share on other sites More sharing options...
MSasu Posted August 1, 2014 Share Posted August 1, 2014 If you will include the page number in layouts naming may adapt one of the Diesel expressions proposed here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.