Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Could it be that your problem is a simple typo? Shouldn't the "1" highlighted in the picture be a "2"?
Apart from the (real) possibility that they (PTC) didn't think that users would actually want to use WRITETEXT in a program (nothing in the help files indicates, let alone describes how, you could use it in a program):
I see no error (message) in the picture you provided. Please provide (also) a worksheet.
You only defined the 'check' variable in terms of a (little) program.
In order to actually execute the WRITETEXT function in that little program, it must be evaluated. Did you try evaluating check yet?
To evaluate check type:
check=
Success!
Luc
No success here so far...
This (picture) does not show it is not working (neither that it is).
Luc
Did you save the worksheet that contains this? Did you check the contents of the directory where it is saved to (should be equal to what
CWD=
shows)
And do you have sufficient rights to create a file in the directory that CWD points to?
Luc
I'll post the whole testfile once again.
The file contains 2 files that should be written. The first one is written regardless of the check, and it actually is in the folder.
The other one in the program is not written, though it should be in the same folder.
WRITETEXT does not recover data from a file, for that you need READTEXT. I'm not sure what your check routine is supposed to do. Try the example from the help files:
No, we're just talking about writing to files.
The problem is, that I haven't managed to write to file if the code is in a program component.
Could it be that your problem is a simple typo? Shouldn't the "1" highlighted in the picture be a "2"?
YES, it could be as simple as that!