View Full Version : Insert a field that would show the layout tab name on the dwg
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.
ch00su
2006-10-23, 10:10 PM
Type this in Diesel Expression box.
$(getvar,ctab)
Young.
Mike.Perry
2006-10-24, 07:28 AM
Hi "rmk" ( Sorry, I do not know your real name )
Please note I have *moved* this thread from the AutoCAD 2007 General (http://forums.augi.com/forumdisplay.php?f=342) forum to this one, as I feel this particular forum is a more appropriate place for such a topic.
Thanks, Mike
Forum Manager
Capt. Computer Crasher
2008-10-28, 07:50 PM
Type this in Diesel Expression box.
$(getvar,ctab)
Young.
Thanks I been try to figure that out too
blackqube
2008-12-12, 08:10 AM
Diesel is ok but Filed is much better:)
INSERT---- Field
DOCUMENT------ Filename
With dwg or without dwg! Works perfect!
regards
Baghera
2008-12-12, 04:24 PM
Diesel is ok but Filed is much better:)
INSERT---- Field
DOCUMENT------ Filename
With dwg or without dwg! Works perfect!
regards
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.
Type this in Diesel Expression box.
$(getvar,ctab)
Young.
Thank You!
irneb
2010-04-09, 07:28 PM
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.
jmcbride.161140
2010-05-05, 09:03 PM
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!!
irneb
2010-05-06, 04:52 AM
Reasonably simple if the number portion always stays the same length. For the number itself try:
$(substr,$(getvar,ctab),1,4)For the rest of the tab's name try:
$(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.
eddie9139
2013-02-16, 02:45 AM
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! :)
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.