Hi there,
I seem to have bumped up against a QCAD limitation in custom property size, in particular in the maximum size of data allowed in a custom layer property. I am storing JSON strings in custom layer properties, and one of them was quite a bit larger than the rest, at around 14 or 15 K bytes. (Mostly, they were much less than 1K.)
What happens is that the large custom property is silently dropped from the DXF, and my testing leads me to believe that the behaviour is caused by the large size of the property text, because reducing the size progressively resulted in reaching the point where the property would no longer be dropped from the DXF. (I think it was around 8K or 10K, something like that.)
Would it be possible to increase the maximum size allowed in custom properties to, say, 20KB? I guess there must be some reasonable limit for memory management purposes?
Kind regards,
David
Custom Layer Property Maximum Size
Moderator: andrew
-
- Newbie Member
- Posts: 4
- Joined: Tue Oct 10, 2017 12:46 am
Re: Custom Layer Property Maximum Size
Unfortunately, these are very likely DXF/DWG format restrictions which are not possible to overcome (without breaking the file format).
I would advise against storing anything but the most trivial data as custom properties and instead keep more complex data elsewhere and only reference it through a custom property. I.e. the custom property could hold an ID which can then be looked up in a database (SQL, XML, JSON, etc.) for additional information.
I would advise against storing anything but the most trivial data as custom properties and instead keep more complex data elsewhere and only reference it through a custom property. I.e. the custom property could hold an ID which can then be looked up in a database (SQL, XML, JSON, etc.) for additional information.
Re: Custom Layer Property Maximum Size
Please refer also to this topic for more information:
viewtopic.php?f=2&t=3269
viewtopic.php?f=2&t=3269
-
- Newbie Member
- Posts: 4
- Joined: Tue Oct 10, 2017 12:46 am
Re: Custom Layer Property Maximum Size
Okay, thank you, Andrew! That makes some sense, I guess. I'll have to live with it and do something along the lines of what you have suggested.
Many thanks!
David
Many thanks!
David
Re: Custom Layer Property Maximum Size
An alternative would of course be to split long properties up into multiple properties. Something along the lines of MyProperty001, MyProperty002, MyProperty003 which are then interpreted as "MyProperty". Arguably, QCAD could even do that automatically when saving and stitch those together when loading, without the user noticing. I'll give this some thought.