PDA

View Full Version : Working with Tabs



ZenCad1960
30th Jan 2008, 05:34 pm
A few of the clients we work with use facility codes as part of their drawing name standard. We use the drawing name to rename the Tab in each sheet. Keeping in mind there are upwards of 200 drawings with one tab per drawing.

Does any one know how to make the tab automatically reflect the drawing name minus the ".dwg" extention?

I am not sure if there is an obscure feature in options of hidden somewhere or is there a vba code or something I can use.

The problem is that more often than not, we do not get the facility code until way into the design so we use XXXX as a place holder.

Any and all help will be greatly appreciated.

Zen

SLW210
30th Jan 2008, 10:53 pm
I think you can do that with FIELDS. Do a search on here, I think this came up not too long ago.

Here is something to look at...

http://www.cadtutor.net/forum/showthread.php?t=11537

mahahaavaaha
31st Jan 2008, 06:09 am
Hi,

add this (or create it in your AutoCAD supportpath) to your acaddoc.lsp -file:


(defun layoname ()
(setq w (getvar "DWGNAME"))
(setq pit (strlen w))
(setq pit (- pit 4))
(setq name (substr w 1 pit))
(command "-layout" "r" "" name)
)
(defun S::STARTUP()
(layoname)
)


/Petri

SLW210
31st Jan 2008, 03:02 pm
Hi,

add this (or create it in your AutoCAD supportpath) to your acaddoc.lsp -file:


(defun layoname ()
(setq w (getvar "DWGNAME"))
(setq pit (strlen w))
(setq pit (- pit 4))
(setq name (substr w 1 pit))
(command "-layout" "r" "" name)
)
(defun S::STARTUP()
(layoname)
)
/Petri


Petri,

How would I do that for just a single drawing, here and there?