Re: Insert a field that would show the layout tab name on the dwg
Quote:
Originally Posted by
Baghera
This works, but I believe he wanted the tab name, in which case he will want the CTAB listing. It's under the system variables in fields.
Thankyou, this was very helpful! :)
Re: Insert a field that would show the layout tab name on the dwg
Quote:
Originally Posted by
irneb
Reasonably simple if the number portion always stays the same length. For the number itself try:
Code:
$(substr,$(getvar,ctab),1,4)
For the rest of the tab's name try:
Code:
$(substr,$(getvar,ctab),6)
The substr diesel function requires the start position number (i.e. the 1 and the 6). The 2nd number is how many characters should be extracted, if this is omitted it extracts all up to the end. The code you had basically calculated the length less 3 for the start point - thus the 4th last position.
Thank you, irneb! This works perfectly with a pure XREF titleblock with fields in mtext referencing custom file properties in lieu of attributes and allows me to leave attributed titleblocks out of our drawings now.
Re: Insert a field that would show the layout tab name on the dwg
Quote:
Originally Posted by
designer2060682891
Thank you, irneb! This works perfectly with a pure XREF titleblock with fields in mtext referencing custom file properties in lieu of attributes and allows me to leave attributed titleblocks out of our drawings now.
This is also a great way to side step Sheet Set Manager for the most basic sheet set where all of the layout tabs reside in one drawing. Very cool!
Re: Insert a field that would show the layout tab name on the dwg
Quote:
Originally Posted by
irneb
Reasonably simple if the number portion always stays the same length. For the number itself try:
Code:
$(substr,$(getvar,ctab),1,4)
For the rest of the tab's name try:
Code:
$(substr,$(getvar,ctab),6)
The substr diesel function requires the start position number (i.e. the 1 and the 6). The 2nd number is how many characters should be extracted, if this is omitted it extracts all up to the end. The code you had basically calculated the length less 3 for the start point - thus the 4th last position.
So.... say you have 25 pages of cross sections in civil 3d and you want to put in a field (in model Space) above each cross section that is tied to the corresponding layout tab. So if your cross sections were page # 26-50 of your set then the field for tab of sheet #47 would allways say 47, (even when you are looking at it in model space) and if your drawing set grew and sheet 47 is now 53, then all the fields would update to the # of their corresponding tab, regardless of whether or not you were looking at them in MS or PS.