brawleyman Posted June 17, 2009 Share Posted June 17, 2009 I have created a title block that automatically fills out almost all the information from the .DST file for a project (project number, name, drafter, checker, create date, page number, etc.). Right now, I have a Custom Properties that I just fill out the total number of sheets, but I was hoping that it could become automatic. I have been searching, but evidently there is nothing that keeps a count of the total number of sheets in a sheet set. Is there a LISP routine that can extract that information so that I can put it in field on the title block? Thanks! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 18, 2009 Share Posted June 18, 2009 We use 1 layout tab per plotted sheet I know you can get a list of your layout tabs hence total number of plotted sheets not sure if this is what you want search here for code (layout tabs) Another try we have an automated system for updating title blocks it would allow me to count the number of blocks updated hence number of sheets this may work for you now if your already updating blocks it just means a second pass. Quote Link to comment Share on other sites More sharing options...
Commandobill Posted June 18, 2009 Share Posted June 18, 2009 This will return how many tabs you have in a drawing... Is that what you're looking for? (length(layoutlist)) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 18, 2009 Share Posted June 18, 2009 If you are looking to manipulate the Sheet Set manager through LISP, I believe its pretty difficult - (beyond my knowledge anyway), I think it runs on a COM interface. Quote Link to comment Share on other sites More sharing options...
brawleyman Posted June 19, 2009 Author Share Posted June 19, 2009 For each project, there will be several drawing files (one for floor plans, one for risers, details, etc.). Each drawing file will have multiple tabs with titleblocks. I was hoping that there was a way to keep a count of all the sheets in the sheet set without having to manually input it. I guess I will have to wait until they come out with something in 2010 or beyond... Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 19, 2009 Share Posted June 19, 2009 As CommandoBill says, if you want to count the tabs in each drawing: (length (layoutlist)) Will do the trick - you could run this on many drawings and sum the total - is this what you are after? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 19, 2009 Share Posted June 19, 2009 If you write a script to open all the drawings then run (length (layoutlist)) write the answer to a txt file say called project- name with 2 columns tab-no dwgname. you can then in any drawing read the total number of sheets. Or always re-read all the drawings and update sheet number. You could get a bit smarter and renumber all sheets as well if say you inserted a tab you just need a list of drawings and the correct order. I am suggesting two programs. Just another thought do a test run ie dont change anything but run a check that everything is correct and you have accounted for every sheet. To make life easier you can get a lisp program to write a script and then run it this way (command "script" myscript)you only need a source txt file as above rather than hard coding a script every time. (phew 3rd program now) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 19, 2009 Share Posted June 19, 2009 Well, I'll get you started if you like... here program 1... (defun c:shtcnt (/ path ofile) (setq path "[color=Red][b]C:\\sheet.txt[/b][/color]") (setq ofile (open path "a")) (write-line (itoa (length (layoutlist))) ofile) (close ofile) (princ)) Change the highlighted path to what you want (use double backslashes..) Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted December 6, 2016 Share Posted December 6, 2016 Well, I'll get you started if you like... here program 1... (defun c:shtcnt (/ path ofile) (setq path "[color=Red][b]C:\\sheet.txt[/b][/color]") (setq ofile (open path "a")) (write-line (itoa (length (layoutlist))) ofile) (close ofile) (princ)) Change the highlighted path to what you want (use double backslashes..) Hi guys, How Can I create a field for the total of sheets? Thanks Quote Link to comment Share on other sites More sharing options...
SLW210 Posted December 6, 2016 Share Posted December 6, 2016 Perhaps check out THIS THREAD Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted December 8, 2016 Share Posted December 8, 2016 Perhaps check out THIS THREAD Thank you SLW210! 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.