View Full Version : Dynamically updating titleblocks
cadsultant
2nd Sep 2004, 09:30 pm
I have projects which contain a large number of sheets in each set. :idea: I would like to be able to create an external text file, which contains all the information pertinent to a particular project, for example project name, project number, etc... and have the attributes in my titleblock automatically updated according to the text file. This will allow me to change one text file, and all the common project information will be updated in all titleblocks.
RTEXT seems to be helpful for notes. Diesel as little as I know about it, seems to only extract information within the drawing. Can anyone please tell me where to look, or how to combine if at all possible, rtext and diesel, so that I can set each line with a variable name, so that I can insert portions of the same text file in different areas of the titleblock.
If there is a better way to get the results, please let me know which direction I can go. I appreciate any responses. Thanks in advance.
fuccaro
3rd Sep 2004, 06:18 am
The first thing coming up in my mind is XREF. Create a drawing containing only the title date block and XREF it in all your drawings belonging to a project. If you change the title date block AutoCAD will update all the other drawings to reflect the changes. Read more about the XREF in the AutoCAD Help file (or ask us :D )
If for some reasons do you need external files: create a Word document for each field. In your DWGs: Insert > OLE Object... >Create from file. Push the Browse button and navigate to the first document you just saved. Check the Link box and push OK.
Repeat these for each document, in each drawing.
The content of the documents is linked into the drawing. Change the DOC file and next time you open a dwg it will reflect the changes.
cadsultant
3rd Sep 2004, 05:10 pm
Thanks for the reply Fuccaro. The xref idea is a deffinate option. However, is there a way to use your second alternative, using RTEXT and not OLE... and also using only one file with several variables. See the example below.
TITLE: TITLE GOES HERE
PROJECT NO: 5647
DESIGNED BY: ME
DRAWN BY: ME
Mr T
3rd Sep 2004, 10:06 pm
Whilst at an Inventor and Mech Desktop TEST DRIVE day the guy whizzed thru all this automatically BOMs etc as well all integrated.
Nick
fuccaro
6th Sep 2004, 06:56 am
Cadsultant
It is possible to write a program for. Do you wish to update attributes in a block? Or maybe the text to be changed is just a text or mtext entitie placed wherever in the drawing?
cadsultant
7th Sep 2004, 04:40 pm
fuccaro,
yes I would like to update attributes in a block. any help or guidance you can give I would greatly appreciate.
jcrayford
26th Jan 2009, 10:29 pm
Hi
New user here, but this is my same problem. I've got a text file, generated from another program, but would like to be able to "process" the text file, seperate out the values from the text file, then update / modify blocks within the CAD dwg and change the attributes within the titleblock.
For instance, I've attached a sample text file (sample_data.txt) that contains values in the following format: Point,localN,localE,lat27,long27,utm27Nutm27E,cm,l at82,long83,utm83N,utm83E,
and need to import those values from the text file into the attached blocks (vert-coords.dwg, vert-geo-coords, vert-utm-coords) in the corresponding attributes.
I've started a lisp (I'd rather lisp it) that allows users to select the text file, but then ?????
(defun c:vert-coords ()
(setq S_NOR_SOU 0
S_NOF 0
S_NBDY 0
S_EAS_WES 0
S_WOF 0
S_EBDY 0
S_SECT 0
S_THEO 0
S_N_UTM_27 0
S_E_UTM_27 0
S_N_UTM_83 0
S_E_UTM_83 0
DD_ZONE 0
DD_Meridian 0
S_LAT_27 0
S_LONG_27 0
S_LAT_83 0
S_LONG_83 0
S_LAT_27_DMS 0
S_LONG_27_DMS 0
S_LAT_83_DMS 0
S_LONG_83_DMS 0);end setq
(setq imfile (getfiled "Select the text file (*.txt)" "" "txt" 8))
);;; End defun
Any help would be much appreciated.....
Thanks,
J.
BIGAL
27th Jan 2009, 02:43 am
Not a problem to do for both requests, search here for "BIGAL" and "blocks" I posted the code to do a search for title block updating only a couple of days ago its in VBA find it easier to use when editing blocks.
You only need to add a read text file to it to read in the variables it will update over multiple layout tabs automatically.
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.