The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 add textlabel from a textfile

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
J.Stellmacher Posted - 02/26/2016 : 12:22:52 PM
Hi all,
I'm writing a script in the "script after each file" section of the import wizard which is supposed to automatically plot my imported data. This works fine but I want to add a text label with text from a text file. So I somehow need to save the text from the file to a string, at which point I seem to fail. I don't get the readString command to work. Is there anything special to consider here or is there another way? I have the file path in a string. So the general idea should be: Declare a stdiofile object with this path, read the file and add this to the string I want to display, add the label to my plot, done. right?
regards
3   L A T E S T    R E P L I E S    (Newest First)
Sophy Posted - 03/03/2016 : 02:51:10 AM
hi, J:


I think you were using something like the following in Labtalk

%K=test_set_longtext()$;


In Labtalk help file, it say each String Register can hold up to 260 characters at most(%A-%Y, except for some reserved ones, like %Y, %G etc), yet there is an exception, the %Z, so you may change your code to

%Z=test_set_longtext()$; //%Z can hold longer text
or
strText$=test_set_longtext()$;


Hope it helps.
J.Stellmacher Posted - 03/02/2016 : 09:20:26 AM
Ok, I wrote this .c file and it works fine when I start it from the command window in Origin. But when I return the string to my script it seems to be limited to a fixed number(267)of characters. Can anybody tell me why this is and how I can change this or what else to do?
regards
Shirley_GZ Posted - 02/29/2016 : 02:47:24 AM
Dear sir/Madam,

The "script after each file" section of the import wizard only accept the LabTalk script, but the readString command and stdiofile object you used are Origin C functions.

Please try to create a .c file to define the functions you want using Origin C and then call the functions in the "script after each file" section.

Thanks,
Shirley

Originlab Technical Service Team

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000