Auto fill Fields, based on total amount of layouts and where layout tab is with in tab group

Auto fill Fields, based on total amount of layouts and where layout tab is with in tab group

chrisk3FHDQ
Participant Participant
304 Views
2 Replies
Message 1 of 3

Auto fill Fields, based on total amount of layouts and where layout tab is with in tab group

chrisk3FHDQ
Participant
Participant

So I am trying to set up a field to automatically count the amount of layout tabs are in the overall drawing set, and then have a separate field autofill with a number based on where a tab is with in the order.

 

ex: I have 10 tabs, the one field would autofill with 10, and would automatically change to 11, if I added another layout tab.
meanwhile a separate field is tracking where a certain layout resides with in that lot of 10, say I have layout tab 2, and I move it ahead of tab 4, then tab 3 is now tab 2, tab 4 is now 3, and tab 2 becomes 4, and the field number would auto adjust if layout tabs were inserted or deleted as well. 

 

 

I dont know if this is possible but it would save me some time if it was. any advice would be great. 

 

currently I am using the same field expression function to make changes across all layouts but I still have to go back in and change stuff manually as well

0 Likes
305 Views
2 Replies
Replies (2)
Message 2 of 3

ronjonp
Advisor
Advisor

Are you wanting to fill out an attribute? I don't know of a way that auto updates but code for this is trivial.

 

There are also sheet set fields ( "%<\\AcSm Sheet.Number>%" ), but you'd still have to go and number within the sheet set.

 

Post a sample drawing.

0 Likes
Message 3 of 3

Sea-Haven
Mentor
Mentor

I dont have fields but have update at any time.

 

The count of layouts 

(setq alllays (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))))
(setq count (vla-get-count alllays))

 

taborder

(vlax-for lay alllays
(if (= numlay (vla-get-taborder lay))

maybe do a new list ((1 layout1)(2 Layout3)(3 layout2)....

 

I have do x of y for title block, it updates 2 attributes in the titleblock, which sounds like what you want again not fields.

 

Post a dwg must have title block with attributes.

0 Likes