Is there a way to insert a field that would show the layout tab name on the dwg similar to the filename? Any help would be appreciated.
|
Is there a way to insert a field that would show the layout tab name on the dwg similar to the filename? Any help would be appreciated.
Type this in Diesel Expression box.
$(getvar,ctab)
Young.
Hi "rmk" ( Sorry, I do not know your real name )
Please note I have *moved* this thread from the AutoCAD 2007 General forum to this one, as I feel this particular forum is a more appropriate place for such a topic.
Thanks, Mike
Forum Manager
Diesel is ok but Filed is much better
INSERT---- Field
DOCUMENT------ Filename
With dwg or without dwg! Works perfect!
regards
Loyalty above all else except honor
For my honor is my life!
The nice thing about the diesel method (as per post 2 by ch00su) is that you can surround it with a substr diesel function to extract only a portion of the tab name. Not so with the direct system variable field.
I do something similar: our file names contain the project #, as well as the drawing number's group code. Then the tab has the last 2 digits of the drawing number - this so the DWG may contain more than one tab with each their own unique dwg#. I use substr with getvar,dwgname to extract the required portions from the filename. You could do the same thing with the getvar,ctab.
I am trying to get some fields to fill in from my layout tabs as well. Could you possibly help? We name our layouts like this " 3.01 Elevations" or "1.04 Reflected Ceiling Plan". I would like to fill 1 field in my Title Block with the number i.e. "3.01" and another field with the "Elevations". I know the ctab system variable for the whole layout. I also found this...
$(substr,$(getvar,"ctab"),$(-,$(strlen,$(getvar,"ctab")),3))
which gives you the LAST 4 characters. Any help would be great!!
Reasonably simple if the number portion always stays the same length. For the number itself try:For the rest of the tab's name try:Code:$(substr,$(getvar,ctab),1,4)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.Code:$(substr,$(getvar,ctab),6)