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

Revision history [back]

Using C++ Cast in OpenStudio Python SDK

I'm trying to create HVAC nodes using the Python bindings for the OpenStudio SDK. I'm running into a challenge with casting the ModelObject type to a Node type. It seems relatively simple in C++, but I'm unsure of the Python commands. I'm currently trying to follow this example from the OpenStudio source code.

 Node fanInletNode = fan.inletModelObject()->cast<Node>();

Using C++ Cast in OpenStudio Python SDK

I'm trying to create HVAC nodes using the Python bindings for the OpenStudio SDK. I'm running into a challenge with casting the ModelObject type to a Node type. It seems relatively simple in C++, but I'm unsure of the Python commands. I'm currently trying to follow this example from the OpenStudio source code.

 Node fanInletNode = fan.inletModelObject()->cast<Node>();