Author |
Topic |
|
JRoby
USA
6 Posts |
Posted - 04/20/2015 : 7:06:26 PM
|
LabTalk is limited to 3799 characters when reading long, embedded Note text: string str; str$ = col(2)[1]$; // Source of embedded Note str.GetLength()=; outputs 3799 Must be some defined buffer limit.
If I don't know the name of the Notes Window (I won't in this application), how can I read the full text? The GetText method of the Dataset reads the cell as empty (Origin 2015SR2). The GetCell method of the Worksheet has a similar limit to LabTalk: // This code reports 3799 characters string ReadNote(string strSh) { Worksheet wks(strSh); string str; wks.GetCell(0,1,str); printf("Length : %u\n", str.GetLength()); return str; } Oddly, if this function is called from LabTalk, the string is further truncated to 3071 characters.
So, unfortunately, only if I know the name (and stay within Origin C) can I process the full text: ... Note nt(strNoteName); string str = nt.Text; ... |
Edited by - JRoby on 04/22/2015 02:38:17 AM |
|
Shirley_GZ
China
Posts |
Posted - 04/22/2015 : 04:24:55 AM
|
Hi,
Inside Origin, when get text from a cell in worksheet, the length limitation is 3800(including the terminator '\0'), since in most case, we assume the text in a cell should not exceed this limitation, yet embedded Note is an exception, we may consider to improve that later(provide some API to get embedded Note page name).
Originlab Technical Service Team |
|
|
|
Topic |
|
|
|