YZ Posted June 21, 2011 Posted June 21, 2011 Is there a way to return the total number of layouts in a drawing file? I would use it to update a field showing the total number of sheets in a set. (eg 2 of "X", where X is the field variable). Quote
BIGAL Posted June 21, 2011 Posted June 21, 2011 heres one way the variable Len is the number you require (setq doc (vla-get-activedocument (vlax-get-acad-object))) (vlax-for lay (vla-get-Layouts doc) (setq plotabs (cons (vla-get-name lay) plotabs)) ) (setq len (length plotabs)) Quote
YZ Posted June 21, 2011 Author Posted June 21, 2011 Thanks BIGAL. I do not think that I can use this solution because I am only using LT. Is that correct? If I break it down, does the code you provided extract a list of all the layout tab names and then count the number of items in that list? It looks unlikely therefore that I can get a simple variable in the Field dialog box. Quote
BIGAL Posted June 22, 2011 Posted June 22, 2011 Didnt see the LT not sure if you can get around it smae sort of thing how many layers in a drawing theres no variable saved with the total. Quote
eric_monceaux Posted March 27, 2013 Posted March 27, 2013 Hey BIGAL, this is almost exactly what I need, however is their a way to have it subtract the MODEL tab or just less one? Quote
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.