cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

WRITETEXT in programs

AndreasZieritz
7-Bedrock

WRITETEXT in programs

Why isn't writetext working in programs?

 

 test.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions

Could it be that your problem is a simple typo? Shouldn't the "1" highlighted in the picture be a "2"?

B.png

View solution in original post

9 REPLIES 9

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...

check.PNG

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.

check.PNG

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:

Capture.PNG

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"?

B.png

YES, it could be as simple as that!

Top Tags