PDA

View Full Version : Xdata -info problem



csgohjmj
2004-08-31, 07:38 AM
I created xdata info by using the codes 1000 and 1040.
(-3 ("TEST" (1000 . "This is a test")(1040 . 1000.00)(1040 . 1500)(1040 . 250))) is added to an entity and saved the dwg.
However, when I reopened the dwg and retrieve the data, some of its 1040 have been changed to some other values (int this case to 0.000). Why is this so? The only conclusion I could draw from this experience is that I can only define codes other than 1000, once only. Pls enlighten.

csgoh

RobertB
2004-08-31, 07:10 PM
That is not true. You can use multiple 1040's. It must be a coding error.

msjca
2004-09-08, 05:35 PM
After adding your data to the entity (and before saving/existing the dwg) did you
(entget (car (entsel)) '("TEST"))? What are the results?

I assuming that the xdata was added to the entity via (setq newent (append entdata yourdata)) and then (entmod newent) or something like that? Also, I assuming that there was no xdata associated with the entity prior to adding the data, please?

I aggree with RobertB that there may be coding problem. Run tests. return the list of xdata prior to adding to the entity list as well as after updating the data. Is the list as you desire? I notice that some numbers are entered with decimal points and some without; try changing one or more to include .00, like the 1st one or removing from the 1st? Try using 1070 for integers?

csgohjmj
2004-09-09, 11:34 AM
Thanks for the tip. After looking through my codes, I had actually entered integer values into code 1040 and that was what Robert said about codeing. Once again, thanks.

csgoh