Xdata maximum length

Xdata maximum length

Ahmadi_rad
Enthusiast Enthusiast
3,087 Views
6 Replies
Message 1 of 7

Xdata maximum length

Ahmadi_rad
Enthusiast
Enthusiast

Hello

Trying to customize autocad based on Xdata, found that autocad has a maximum allowable length of 256 bytes. How to overcome this problem?  

0 Likes
Accepted solutions (1)
3,088 Views
6 Replies
Replies (6)
Message 2 of 7

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Hi,

 

using <DbObject>.ExtensionDictionary instead of XData would be a chance.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 3 of 7

Ahmadi_rad
Enthusiast
Enthusiast

Thanks a lot

Will try it and come back soon

0 Likes
Message 4 of 7

Alexander.Rivilis
Mentor
Mentor

@Ahmadi_rad wrote:

Hello

Trying to customize autocad based on Xdata, found that autocad has a maximum allowable length of 256 bytes. How to overcome this problem?  


256 - is a maximum length of one string, but you can use few strings such as:

(1000 . "First line")
(1000 . "Second line")
(1000 . "Third line)

But maximum total length of XData of all applications in one object/entity is 16K bytes.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 5 of 7

dgorsman
Consultant
Consultant

If you're running into that kind of limitation, it's a good idea to review what you are doing.  Perhaps it would be better to do other things, like push pointers which can be extracted and used as a lookup key in an external system.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 6 of 7

Ahmadi_rad
Enthusiast
Enthusiast

Hello and thanks for the response. I'm serializing some small c# classes and adding them to drawing entities. breaking the serialization string to 256byte strings may not be the easiest, but good to know.

By the way thanks 

0 Likes
Message 7 of 7

Ahmadi_rad
Enthusiast
Enthusiast

I'm not a professional programmer, It takes me time to find some time in between my jobs and modify my macros. Last night I finished this solution and it worked. Thanks.

0 Likes