Extended data limit
Hello all,I am busy writing extended data into my drawing but seem to run into a limit of 16383 bytes of Xdata per object?( See http://discussion.autodesk.com/forums/thread.jspa?threadID=377814) If I want to store some program configuration data into a drawing, is there a more flexible (or smarter way) of doing this?TIA.Arno van Eeuwen
Comments
-
Arno, look into dictionaries and xrecords.See: afralisp for a start.
0 -
There's one eye opener within the hour.Thanks Greg!Arno(Will propably be back with more questions later)
0 -
16383 bytes that's the limit, that's the way it's supposed to be.If your programming with LISP you can you use "xdroom" and "xdsize"to check how much space is left or already used up.
0 -
Thanks Jorg,I wasn't aware of this limit, but it looks like the dictionaries are going to offer me what I need.We're going to write quite some bulky stuff into the drawing, probably by COM, but that seems no problem.Cheers.
0 -
vlax-ldata- functions also works in V9. Try in command line:
: (vl-load-com)T: (setq ent(car(entsel)))Select entity: : (vlax-ldata-put ent "MyDic" '((0 . 1234)(1 . "TestData")))((0 . 1234) (1 . "TestData")): (vlax-ldata-get ent "MyDic")((0 . 1234) (1 . "TestData"))
0 -
I would stringly suggest to use dictionaries ... using VLA Lisp (via COM), even each entity can have an extension dictionary, so such dictionaries are bound to the entites; normal dictionaries are not directly bound to the entities.So both has its advantages.But I would also suggest NOT to use LDATA ...for several reasons :- it is originally implemented as a "custom object" by Autodesk AutoLISP => thus, if such a dwg is loaded into any other CAD system, you can get several error messages- if the drawing is exported as DXF, the chances are pretty high, that a DXF reader will fail on LDATA, as the data-structure is quite strange and uncommon- LDATA access is very slow (due to compex conversions from Lisp data into dwg-storable data- the chances, that our LDATA implementation does not perfectly match the original AutoLISP implementation are somewhat higher than 0 ... not even big, I but I would not bet on this.Imho, there is no real need to use LDATA ... only disadvantages :-)
0