Custom Layer Property Maximum Size

Please use this forum to post feedback and suggestions related to QCAD.

Moderator: andrew

Post Reply
DavidKTrudgett
Newbie Member
Posts: 4
Joined: Tue Oct 10, 2017 12:46 am

Custom Layer Property Maximum Size

Post by DavidKTrudgett » Tue Oct 10, 2017 12:03 pm

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

User avatar
andrew
Site Admin
Posts: 5710
Joined: Fri Mar 30, 2007 6:07 am

Re: Custom Layer Property Maximum Size

Post by andrew » Tue Oct 10, 2017 1:06 pm

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.

User avatar
andrew
Site Admin
Posts: 5710
Joined: Fri Mar 30, 2007 6:07 am

Re: Custom Layer Property Maximum Size

Post by andrew » Tue Oct 10, 2017 1:12 pm

Please refer also to this topic for more information:
viewtopic.php?f=2&t=3269

DavidKTrudgett
Newbie Member
Posts: 4
Joined: Tue Oct 10, 2017 12:46 am

Re: Custom Layer Property Maximum Size

Post by DavidKTrudgett » Wed Oct 11, 2017 1:23 am

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

User avatar
andrew
Site Admin
Posts: 5710
Joined: Fri Mar 30, 2007 6:07 am

Re: Custom Layer Property Maximum Size

Post by andrew » Wed Oct 11, 2017 8:56 am

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.

Post Reply

Return to “QCAD Suggestions and Feedback”