WRITETEXT in programs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
WRITETEXT in programs
- Labels:
-
Programming
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Could it be that your problem is a simple typo? Shouldn't the "1" highlighted in the picture be a "2"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
No success here so far...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This (picture) does not show it is not working (neither that it is).
Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Could it be that your problem is a simple typo? Shouldn't the "1" highlighted in the picture be a "2"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
YES, it could be as simple as that!