View Full Version : Field BUG?

2004-12-03, 03:39 PM
Using A2K5, obviously....

To my knowledge, a field expression in mapped to an Object Id.

FE: %<AcObjProp Object(2117824080).TextString f "%bl2">%
(in this case) Object ID of Text: 2118934440

The crazy thing is, is that the FIELD still updates properly, even though
the Object Id in the FIELD expression is different. This does not make sense
why it still works. This could be a HUGE problem, or even a bug.
Why does it update properly, and how does it know what source Object Id,
since the source has a different ID that the Field expression.

I have wrote some VBA code to find an object based upon the Id in the field,
but Acad crashed every
time now with a FATAL Error, when I discovered this anomaly in the drawing
Otherwise the code works fine.

Any explanations?


2004-12-03, 03:45 PM
I am including an example of the problem....Thanks for any answers.


2004-12-03, 07:22 PM
Thanks for the sample drawing. However, the ObjectID of the MText object does match the one used in the field (at least in your uploaded file). Run this sample code to see that it does:

Public Sub Test()
Dim pickObj As AcadEntity
Dim pickPt
ThisDrawing.Utility.GetEntity pickObj, pickPt, vbCrLf & "Select object: "
Debug.Print pickObj.ObjectID
End Sub

2004-12-05, 10:25 PM
I opened the drawing and it behaved the way it should. The field does not update.
Regards - Nathan

2004-12-09, 04:47 PM
The problem I am finding could be my code I use to get the field expression, but I do not know why it works fine i most cases and errors out here. This is a big problem, because AutoCAD simply crashes

I am attaching the VBA code and dwg files. Thanks Again,

2004-12-09, 10:16 PM
Sorry Dan, I can't work out whats going on. I haven't done anything with fields before. Hopefully someone with some experience will work it out.
Regards - Nathan