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

Revision history [back]

click to hide/show revision 1
initial version

Per @pflaumingo's recommendation, you can generally grab and set values in an OpenStudio object using the getString(index) and setString(index, string) functions where index is the index of the parameter for the object you're interested in.

E.g. let's say I wanted the handle for the inlet port of the following Node object:

  {9e27287a-144b-4341-9ff2-f6d7bcc4c37f}, !- Handle
  Node 8,                                 !- Name
  {f2293c91-c542-4f27-8bd9-fff7fc4967b2}, !- Inlet Port <----THIS ONE
  {969fbfbf-fd2a-4397-afec-6d19fc376ed8}; !- Outlet Port

Let's say I grabbed the node and named the object my_node, you'd want to do my_node.getString(2) as the inlet port is the 2nd parameter (remember the indexing starts at 0).