Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question
1

How to open OpenStudio CLI

asked 2021-09-24 00:10:20 -0600

Trying gravatar image

How to you get to the openStudio CLI? I can't seem to figure out how to get to this CLI. Is this something I can call with python terminal? Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-26 00:34:14 -0600

updated 2021-09-26 14:07:28 -0600

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2021-09-24 00:10:20 -0600

Seen: 113 times

Last updated: Sep 26