Question
My question is regarding a previous post called "Auto-Updating Title Blocks" (link below). Xrefs, rtext, or a viewport? I would be very interested in the process to carry out contributer A's suggestion - as in how to insert the right lisp and what it is, etc. The guys I work with are unorganised and we end up with all types of layout pages, title blocks, and spelling errors, which I would love to minimise. Unfortunatley I'm not a CAD genius yet (and some of you seem to be!).
Forum Responses
(CAD Forum)
From contributor B:
I prefer using my own .dwt files. It's a quick way to get the correct title block, layers, text, dimensions, settings, etc. If you're not an experienced lisp programmer, you can spend more time solving the problem than your lisp program saves. Under "file - drawing properties", you can create custom fields that allow you to update every page from a single location.
Not knowing what your AutoCAD abilities are, here are the basics.
1. Open the AutoCAD blank template acad.dwt by going to File and New and select it from the list. This will insure that your new template is clean.
2. In paper space delete the second Layout Tab, then right click on the first layout tab and select page setup.
3. Next select your plot setup for the page size you are about to create or insert.
4. If you have an existing title block you can insert it in the layout tab or start drawing one from scratch.
5. Convert any title block text that will change to a block with attributes. This will give you the ability to easily edit the text per page or globally and keep everyone looking the same.
6. Name the layout tab - typically it's a page number like A1 or A1.1
7. If you use a cover page, copy the layout tab and draw it from scratch or insert your existing one. Name it A0 of cover and move it to the first tab position. The reason you deleted the tab at the beginning is that once you make a page setup and then copy that tab, all that setup info is copied as well.
8. If you use various paper sizes, you can create more layout tabs and make a page setup for each. My template has 24x36 13x19 11x17 8 ½ x 11 and I just delete the ones I don’t need when I begin a project.
9. Once you have the layout tabs and title blocks set up, purge the drawing just in case you inserted any objects that you don’t need.
10. Open design center and navigate to a drawing that has your layers, test and dimension styles in it. Click the + sign and click on layers. In the window on the right you will see a list of all the layers in that drawing and you can either select the fires and hold down the shift key and select the last one to get them all or use the control key to pick and choose. Once highlighted just drag them onto the template drawing and they will be inserted into the drawing. Now repeat this for the texts and dimension styles.
11. A template remembers how everything is set when it is saved, so go through the drawing and set what layer, test and dimension style you want to be active when a user opens a new template.
12. Do a file save as and pick DWT from the file type, give it a name and save it.
13. Now go to tools, then options, and select the file tab and scroll down to where it says Drawing template settings, click the + sigh and click on “default template file name for Qnew”, click on where it says None and then click the browse button to navigate to where you saved your new template and select it. Click apply and close.
Now when you start a job, click that white icon below the file menu (it should be there if you hover over it - it should say Qnew.) and the new template will be inserted as a dwg file. Once you make sure it's working and everything is okay, go to everyone’s machine and copy the template to the same place and set up the qnew for them. This is just the basics of one way and there are many variations that can be done depending on the user's needs and abilities, but I do prefer this method over using xref’s and find it more flexible.
Contributor B, how exactly would you go about changing the settings so as to make certain title block attributes change throughout a project folder?
Now insert your custom fields into your Title Block. They will go right into the attribute values. When you make a change under Drawing Properties and save the drawing, all the fields on all the pages will be updated at the same time. Just remember the updates won't show until you save.
Another tip, when you put Mtext into the Title Block, use Middle Center Justification. This will keep your text centered regardless of the content.
$(getvar,"ctab"),
This way the page number will match the layout name.
Simple lisp:
;*****************
(defun c:tab ()
(setvar "cmdecho" 0)
(command ".-layout" "c" "")
(princ)
)
;*****************
Load the function then type TAB at the command line, enter A.2 (or whatever your naming convention is) and voila. New layout tab, already defined with the correct value in the titleblock.
What we do now is... for a new job, I create a blank titleblock with customer info already filled out. And everything spelled correctly. Then a user just has to copy the file, fill out fields in the custom tab (drawn by, date, etc.) and away they go. Espeically helpful if I have several people working on the same job. Pretty simple. And simple works well for us.
Xrefs can be a great way to do this too. Just don't include data such as drawing number, date, etc. in the xref file.
Contributor A, you may have missed my point - this is a Diesel expression for fields. I like yours better though.