Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Auto-update fields

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
FeeopEngr
2800 Views, 6 Replies

Auto-update fields

A while back, I created a template (Test 1) which had fields on each layout the updated automatically with a regen. All I had to do was double click the text and update the field on the first layout and the other would magically update. In the attached Test 1 it is the A0000 field.

 

Now, I have no idea how to recreate this for a new template (Test 2). Unfortunately, the new template is already created and is quite large (so no save-as).

 

What I need is for the exact same thing to happen. I have tried multiple things to make it work, but to no avail.

 

One thing I noticed that doesn't seem to work is in the field editor. For Test 1, I had:

 

Field category = Objects

Field names = Object

Object type = "BLOCK REFERENCE"

Property = O-CODE (block name)

 

This works great, however I cannot duplicate it in Test 2, even if I insert the old (O-CODE) block, I get:

 

Field category = Objects

Field names = Object

Object type = There is nothing there

 

If I try to select the block from the first layout, the program will not let me go outside the current layout.

 

If I insert the block into the second layout and select it that way, instead of an Object type = Block reference, I get Object type = attribute.

 

If anyone can figure out what I did in Test 1, I would greatly appreciate your help, as once I get it, the whole template will do this.

 

Thanks

Feeop
6 REPLIES 6
Message 2 of 7
zalant
in reply to: FeeopEngr

Upon opening Test 1.dwg, I see a block called OWNERCODE, which contains an attribute, currently set to A0000. There are two fields within the lower right corner Mtext object.  The first field is tied to something which doesn't exist for me, as it gave an error when I tried to edit the field.  I directed it to the Value of the attribute from the OWNERCODE block.  In the Field editor dialog, I chose Objects for the Field category.  Next, I clicked the crosshair button in the Object type column.  I selected the OWNERCODE block from within the drawing by clicking on the O-CODE attribute. This caused the Object type field to show Attribute.  For Property, I selected Value, and the Preview shows "A0000".  Clicking OK exits the dialog and all is well.

 

The other field is tied to the name of the layout tab, which is currently 00-01.  

 

On Tes 2.dwg, I only see the one Text object within the title block that contains a field. That field is tied to the current layout tab, which is G1 on the G1 layout tab, and G2 on the G2 layout tab.

 

I don't see any Mtext object within Test 2.dwg which contains a field.



Zac Travis
Message 3 of 7
FeeopEngr
in reply to: zalant

What you described in para 1 is what I get, but I'm not able to get it onto the second layout and have it update automatically .

 

As for Test 2 dwg, not sure why I even attached it.

Feeop
Message 4 of 7
zalant
in reply to: FeeopEngr

On your first layout (00-01), the attribute is defined within a block. On the second layout (01-01), the A000 value is setup as a field, pulling from the block definition, and not directly from the attribute. On your second layout, you could edit the field in the first part of your mtext object (in the lower right corner) to pull the contents of that other mtext object. It should work, but you might have to manually update the fields. In my case, I just toggled back and forth between the layout tabs, and the update happened. I've attached the modified file to this post. Please let me know how it works for you.

 

Block vs Mtext.png



Zac Travis
Message 5 of 7
FeeopEngr
in reply to: zalant

Precisely. That is how this template was setup years aro.

 

However the problem is, I cannot duplicate it in a new template. Even following everything as it should be. I also tried to copy and paste each item into their respective sheets in the new template, but get the following error when I paste in the MText on sheet 2 and try to access the field "The object referenced by the field is not a valid object"

 

So when I open the field editor and select Objects, Object, there is nothing in the list for Object type, eventhough the block is in the dwg.

 

Further suggestions?

Feeop
Message 6 of 7
zalant
in reply to: FeeopEngr

It appears that you can only link things from objects into fields if you can physically see them (on the same tab, either in model or paper space). Subsequently copying the mtext object breaks the field.  

 

I found a way to do what you're trying to do, though. It's not terribly elegant, but it gets the job done. I don't know how well it will apply to templates, but that depends upon your application.

 

I started with an attribute block on the Model tab. I then created a few mtext objects. I then inserted a field into each of them and made it point to the block's attribute. Lastly, I went to each layout tab and performed a Change Space (CHSPACE) command on the mtext objects, one for each layout tab. That makes the mtext items appear in paper space, which I assume is what you want.



Zac Travis
Message 7 of 7
FeeopEngr
in reply to: zalant

A little extra work, but in the end, that will do nicely. Plus, I shouldn't forget again.

Thanks
Feeop

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost