Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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.

  • 1 year later...
Posted

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?

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