PDA

View Full Version : Autocomplete or linking text within a drawing



garden_chicken
2008-07-21, 03:49 PM
This might be really basic and obvious, can someone point me in the right direction please?
I am working drawings where there are several instances within each drawing where text is repeated in several locations. Is it possible to somehow set up the text so I only need to type it in once and it gets updated in each place? For example, the 'drawing revision' appears in two places, is it possible to type in the revision in one place and have it update in both? I feel like I am in the dark here... I'm currently using AutoCAD 2006.

Thanks a bunch!

rkmcswain
2008-07-21, 04:30 PM
Create a block out of the text, copy it around as needed. If it needs to be updated, edit the block.

dbrownson
2008-07-21, 10:47 PM
or you could always use "find".

i often make place holders like "xx" or "zz" for sheet numbers, then once all the sheets have been established i go back and "find" xx and replace with A1.

not quite what you looking for but somewhat applicable.

irneb
2008-07-23, 07:42 AM
If you're using sheet sets you could place a field linking to the Revision of each sheet (or current) in any text entity.

If you don't use sheet sets, you could link to a property of the drawing in the same way. These are editable in File --> Drawing Properties... (ot just type DWGPROPS). The default properties are Title, Subject, Author, Keywords, Comments & Hyperlink base (under the Summary tab). You could also add custom properties under the Custom tab.

To link, right click inside the text entity (while editing) select Insert Field... (or just press Ctrl+F. The Field dialog opens. In the Field category drop down, select Document. Then all those properties (including custom) is listed in the Field names list box. Pick the format as needed. Click OK.

These fields are updated after a regen. Or depending on your settings in Tools --> Options --> User Preferences (tab) --> Field Update Settings.. (button), it would also update on Open, Save, Plot / eTransmit.

Tip: if you're going to use the same link in various texts. Notice Field expression box in the bottom of the Field dialog. Select all the text (including the % signs at start & end) and press Ctrl+C to copy to clipboard. If you now paste this into any text (MText, DText or Attrib) it will create the same field as you've selected through the dialog box.

ccowgill
2008-07-23, 11:37 AM
you could write a lisp routine that allows you to link text together, so if you change one, it changes all the other linked text. you can use x data to assign a tag to each piece of text that is similar, then use a reactor to update all text that has that tag to match the one you just edited.

irneb
2008-07-24, 05:05 AM
You could accomplish ccowgill's suggestion using reactors. Unfortunately it will only work on PCs with this particular LSP file(s) loaded, since the custom lisp needs to be in RAM for the reactor to fire properly. The benefit is you could edit any one of the texts and all would update, if the reactor is designed in this way.

Another solution would be to use LISP to place the field codes. Or yet another would be to have LISP place field codes to link to a source text entity. Both these would then allow updating even on PCs without the LISP loaded. But the benefit of editing any one of them would be lost - you can only edit the source, otherwise only the text you edit would change & the link would become broken.

So if your drawings are only edited locally, and you're able to install LSP files to all the PCs which would edit them, then ccowgill's solution would be the most effective.

rkmcswain
2008-07-24, 11:54 AM
So if your drawings are only edited locally, and you're able to install LSP files to all the PCs which would edit them, then ccowgill's solution would be the most effective.

No offense to ccowgill or anyone else, but why is using lisp and/or reactors a more effective solution than just making a block out of the text string?

ccowgill
2008-07-24, 07:13 PM
No offense to ccowgill or anyone else, but why is using lisp and/or reactors a more effective solution than just making a block out of the text string?none taken, from my stand point, it depends on how often you change the notes, and how many notes you have to change, if you have one note that exists 50 times and you are only going to change it a couple of times, a block may make more sense, but if you have several notes that appear only a few times and you are always changing them, I think the time saved by just linking the text is better than changing the text into a block, and having to make changes via the block editor. it also depends on what the text is used for, we use linked text at our office in our plan & profile views just because the note is attached to a leader, and that way it keeps its attachment.

amy.stuart
2008-07-28, 08:04 PM
Okay not completey sure if this should go here. but i have a similar problem. We have a template with the Title Block containing Fields. So all layout tabs are linked and update together, etc. But i have a drawing that has the OLD template without Fields. The drawing is an extensive drawing and i would not like to redo it. But when i copy the title block over that contains the fields simply the block comes. Not the field information. Is there a simple way to copy this information over?

irneb
2008-07-29, 05:11 AM
Could you elaborate a bit please? Is the fields linked to Sheet Set properties / Document Properties / Other? What happens when you copy-n-paste the TB over ... does the field portions change to #### or don't they come with at all?

To test, open one of the DWG's where the fields work. Edit one of the texts (or attribs) and double click on the displayed field value. A dialog like the attached should pop-up, this one shows linking to the Document Property - Title, yours might be different. Copy the Field expression at the bottom (in my case it's %<\AcVar Title>%). Post here so we know exactly why this happens, then we can give a more correct answer.

amy.stuart
2008-07-29, 02:24 PM
Could you elaborate a bit please? Is the fields linked to Sheet Set properties / Document Properties / Other? What happens when you copy-n-paste the TB over ... does the field portions change to #### or don't they come with at all?

To test, open one of the DWG's where the fields work. Edit one of the texts (or attribs) and double click on the displayed field value. A dialog like the attached should pop-up, this one shows linking to the Document Property - Title, yours might be different. Copy the Field expression at the bottom (in my case it's %<\AcVar Title>%). Post here so we know exactly why this happens, then we can give a more correct answer.

Mine is to the Drawings Properties. It gives me the #'s signs when i copy from one drawing into another.

irneb
2008-07-29, 03:29 PM
OK, I was thinking this might be the prob. That's why I'd suggest going to Sheet Sets instead. Anyway, searched through my archives - I had a lisp for exporting & importing Dwg Props somewhere (just don't use it anymore).

Save both attached to an AutoCAD support path. Load the LSP file (there's quite a few methods of doing this). This will add the following new commands:

DwgPropExp - saves the Drawing Properties to a PRP file
DwgPropImp - imports Drawing Properties from a PRP file, asking you 1st which you want to overwrite.