News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Text-string limitation ?

Started by JJG, October 29, 2012, 01:04:19 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

JJG

Today, I got a crash when validating a text-command ...

It's true that this text-string was lang enough (certainly more than 256 characters) :
then, I wonder if there is a text-string limitation for this command (Draw/Text) ?
If yes, where is it described or noticed ?


Adding : same issue this evening, when editing a text with the help of the info-box, and placing in a 300 characters text ...

dcadRob

Limit is 255 characters.
References are in the macro help and used to be in  the manuals.
QuoteMacro Limitations

Maximum Program Size: Depends on available memory - up to 30,000 lines. Blank lines and lines containing only comments do not count.

Maximum Array Size: Depends on available memory - up to 200,000 elements (total of all arrays).

Maximum Number of Array Dimensions: 1

Maximum Number of Symbols: 200,000. Symbols include Labels and Variables. Each element of an array counts as one symbol.

Maximum String Size: 255 characters.

Maximum Nesting for Group IF: 30.

Maximum Nesting for FOR-NEXT: 30.

Maximum Nesting for DO-LOOP: 30.

Maximum Nesting for GOSUB: 30.

Maximum Number of Strings: Depends on available memory - up to 30,000 strings.

JJG

Thanks DcadRob,

I alredy know the References you point : but I did not understand that the strings in question are those of the text-command ...
For me, it was referring to the length of a line of code programming.

So I think, therefore, that instead of allowing the program to crash stupidly when the length of a string in a text-command is overflowing, it could be foreseen a function that stops entering additional characters once the quotat of 255 is reached ...
It would be a minimum, don't you believe that ? !!!

Dr PR

jjg,

I agree. You would think that a limit would be written into the program to stop at 255 characters. Other functions give you a warning when you reach or exceed the maximum values.

Phil
DesignCAD user since 1987

Lar

JJG, I'm not sure what you mean by 'validating a text command' but I tested the 'Draw/Text' command (v22) with this sentence from your post...
Quote from: JJG on October 29, 2012, 11:14:14 PM
So I think, therefore, that instead of allowing the program to crash stupidly when the length of a string in a text-command is overflowing, it could be foreseen a function that stops entering additional characters once the quotat of 255 is reached ...
... Upon pasting in text the following message popped up: "Please enter no more than 240 characters." When I clicked OK to the message the text was cleared from the text input field. I re-pasted minus the last word and the text was accepted and I completed the command ok.

Lar
ps: with the Text Block and Multiline Text commands you can enter whole passages of text.

JJG

#5
Lar,

thanks for your reply ;

I'm still at version 21 (french), and when the message you mention appears, a windows message appears too : "program not responding", and Designcad is crashed (and more, the CPU is working 100%, until you kill Designcad-process in the task-manager), what, indeed, the US versions I have (v19 and 21) does not (I just tried that on my personnal computer, at home).

On the other hand, when using the info-box to edit a text, and give it more than 240 characters, will kill Designcad immediatly, whatever version I'm using (french as well as US).

DrollTroll

Our current implementation has a 255-character limit on text entities. However, part of that limit is taken up by font information. The exact limit (minus the font data) seems to depend on what you're doing. You might get one limit if you enter a long string manually in the Text dialog box. You might get another if you edit the string in the Info Box. You might see totally different behavior if you paste a long text string directly into the drawing. And BasicCAD, which is essentially fontless, allows a maximum of 255 characters in any string you manipulate there.
We'll look into this and try to reach consistency in the UI, at least (and try to prevent crashes as well). I don't expect any changes to BasicCAD in this regard, however.
25 years with DesignCAD

JJG

Thanks for all this informations, DT.
I don't expect any changes to BasicCAD in this regard too.
Just a solution in the next-coming vervions to prevent such crash of DesignCAD on such particular point.