First time here? Check out the Help page!
1 | initial version |
Yes, here is a Python script to run the OpenStudio CLI through Python.I subprocess is probably better approach than os.system
.
import os
os.system("openstudio run -w my_dir/in.osw")
The script is in this public repo setup with an OSW file ready to run, or you can use the code above on one of your OpenStudio Workflow (OSW) files.
For reference, Ruby code is almost the same
system("openstudio run -w my_dir/in.osw")
For either of these to work you need to make sure that openstudio
is recognized by the terminal, or use the full path to the CLI when calling the OpenStudio CLI.
Lastly, the MetaCLI which runs OpenStudio Analysis files (OSA) can also be called from any scripting language that can make command calls.
2 | No.2 Revision |
Yes, here is a Python script to run the OpenStudio CLI through Python.I subprocess is probably better approach than os.system
.
import os
os.system("openstudio run -w my_dir/in.osw")
The script is in this public repo setup with an OSW file ready to run, or you can use the code above on one of your OpenStudio Workflow (OSW) files.
For reference, Ruby code is almost the same
system("openstudio run -w my_dir/in.osw")
For either of these to work you need to make sure that openstudio
is recognized by the terminal, or use the full path to the CLI when calling the OpenStudio CLI.CLI. You can learn more about the OpenStudio CLI on the documentation page for it.
Lastly, the MetaCLI which runs OpenStudio Analysis files (OSA) can also be called from any scripting language that can make command calls. calls.
3 | No.3 Revision |
Yes, here is a Python script to run the OpenStudio CLI through Python.I Python. I subprocess is probably better approach than os.system
.
import os
os.system("openstudio run -w my_dir/in.osw")
The script is in this public repo setup with an OSW file ready to run, or you can use the code above on one of your OpenStudio Workflow (OSW) files.
For reference, Ruby code is almost the same
system("openstudio run -w my_dir/in.osw")
For either of these to work you need to make sure that openstudio
is recognized by the terminal, or use the full path to the CLI when calling the OpenStudio CLI. You can learn more about the OpenStudio CLI on the documentation page for it.
Lastly, the MetaCLI which runs OpenStudio Analysis files (OSA) can also be called from any scripting language that can make command calls.
4 | No.4 Revision |
Yes, here is a Python script to run the OpenStudio CLI through Python. I subprocess is probably better approach than os.system
.
import os
os.system("openstudio run -w my_dir/in.osw")
The script is in this public repo setup with an OSW file ready to run, or you can use the code above on one of your OpenStudio Workflow (OSW) files.
For reference, Ruby code is almost the same
system("openstudio run -w my_dir/in.osw")
For either of these to work you need to make sure that openstudio
is recognized by the terminal, or use the full path to the CLI when calling the OpenStudio CLI. You can learn more about the OpenStudio CLI on the documentation page for it.
Lastly, the MetaCLI which runs OpenStudio Analysis files (OSA) can also be called from any scripting language that can make command calls.