Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script doesn't write to output #20

Open
JASaa opened this issue May 17, 2018 · 2 comments
Open

Script doesn't write to output #20

JASaa opened this issue May 17, 2018 · 2 comments

Comments

@JASaa
Copy link

JASaa commented May 17, 2018

I recently started using the program. I have a simple workflow with an input, a script and another script to print the result (it's just a test because a parametric study didn't work because of the problem I am describing).

The script that I use in written in Python and it basicly writes the input in a xml file, witch is the input of an executable that does some calculations and writes the result in a .txt .

The result seems to be correct, but it doesn't pass it as an output to the next script using RCE.write_output ("output0", output_result) . All inputs and outputs are correctly declared and the components are connected. Is it maybe a problem of my executable?

Thank you.

@janflink
Copy link
Member

janflink commented May 23, 2018

Hi JASaa,

Well, by considering the given details, I understand that you will pass a .txt file to output0. In order to do this, you need to specify the path to your text file in the write output command. E.g. RCE.write_output("output0", "${dir:tool}/output_result.txt"). You can make use of the directories combobox at the right-hand side to insert the proper placeholder for your use case.

Hope this helps.

Best regards
Jan

@JASaa
Copy link
Author

JASaa commented May 23, 2018

Hello,

Thanks for answering.

The output of the script is float read from a .txt, to be used in an optimization, eventually. I changed the code to work in Jython and I am able to pass outputs from my script to the Optimizer. The same doesn't apply when using Python, the code executes correctly and the results are correct but it doesn't pass the result forward to the next component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants