Clicking into text brings up “squished” text edit window instead of nice and long one and the warp checkbox is marked?..
Sometimes just clicking out fixes it and Warp checkbox isn’t marked anymore or stretching it to fit text horizontally fixes it also…
Symbols quantity script output: 16 symbols = 14 characters, 1 enter & 1 space (CORRECT)
As soon as I double click in text, click out of it not changing/editing anything and run symbols quantity script, its output is 17.
Visually nothing is changed on text object.
Text Object symbols quantity counter script:
Sub Main()
Dim tag
tag = Rhino.GetObject("Select text to count symbols qty", 512)
If IsNull(tag) Then Exit Sub
tag = Rhino.TextObjectText(tag)
Rhino.Print Len(tag)
The enter in your 2nd example is a combination of: chr(10) & chr(13)
The top one does not contain an enter. So it counts 16. If you want to count 17 you have to replcae your chr(13) with chr(10) & chr(13). Then it counts 17. if you want to count 16 you have to create something where you dont count chr(10) and chr(13).