PDA

View Full Version : Entries Disappear



robert.1.hall72202
2008-08-21, 01:16 PM
What makes a field entry disappear?
I notice that in some of my drawings I am getting #### instead of a number.

I am creating a calculation based off the area of an object.
I have noticed that "move" and "copy" will mess up the field.
I sometimes get a messed up field when copying the entire drawing to a new file.
I can see an issue with AutoCad not having a way of showing which objects
are linked to a field. The object could get erased by an unfamiliar user.

What are some general rules to follow?

rkmcswain
2008-08-21, 06:11 PM
Object fields are tied to the ObjectID. If this changes, then the FIELD has nothing which to refer.

For example, if you created a field to show the length of a polyline, then exploded the polyline, the field would not be able to resolve the length any longer...

robert.1.hall72202
2008-08-21, 07:50 PM
Ok, the object id is the unique identifier, I get it.

I am losing the connection when I copy both the field and the object into
a new drawing file. Save, close, reopen, and it is a goner. It should still be there.

cadtag
2008-08-22, 01:08 PM
but, the copy is creating a new object, with a new object ID. in this case, it's even in a new drawing

robert.1.hall72202
2008-08-25, 12:39 PM
[QUOTE=cadtag;879177]but, the copy is creating a new object, with a new object ID. in this case, it's even in a new drawing[/QUOTE

When I copy a field the new ID should magically change in my formula.
I have a bunch of fields that seem to get destroyed. I may not use
fields because I am printing drawings with information missing.

RobertB
2008-08-25, 05:52 PM
When I copy a field the new ID should magically change in my formula.
I have a bunch of fields that seem to get destroyed. I may not use
fields because I am printing drawings with information missing.Robert, the software cannot read your mind. What if you intended to copy the field while keeping the object the same, so you could simply edit it to display another property of the original object?

The actions are exactly the same. The software has no way to determine your intentions.

The problem is exacerbated when copying to a new drawing. The object ID of the copied target object is assigned automatically when the new object is created, with no magic link to some old object ID. In fact, even if the old object ID was stored, it would be invalid in the new drawing, since there is a very real chance that that object ID is being used in the new drawing by some other object.

So the field has no way to "heal" itself after a copy operation. That's why many of us have written code to reselect the target object and explicitly heal the field. Only an explicit action declares the user's intention.

robert.1.hall72202
2008-08-28, 01:12 PM
Mental note:
If both the field and the linke object are copied, the field still points
back to the original object. Deletion of the original object will
result in a miscalculation for the copied field.

Staying within the same drawing of course.
There is trouble when creating variants of an existing drawing with fields.
The fields need to be redirected to the copied objects.