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

Revision history [back]

You can use foo.handle to get an OpenStudio::UUID object for any OpenStudio ModelObject. I don't know the exact syntax in C#, but here's an example in interactive Ruby:

image description

You can use foo.handle to get an OpenStudio::UUID object for any OpenStudio ModelObject. I don't know the exact syntax in C#, but here's an example in interactive Ruby:

image description

Edit:

If you want to get the UUID of a referenced object, you can do exactly as above by getting the referenced object and then calling .handle on it. Here's an example of getting the UUID of a layer in a construction:

image description

You can use foo.handle to get an OpenStudio::UUID object for any OpenStudio ModelObject. I don't know the exact syntax in C#, but here's an example in interactive Ruby:

image description

Edit:

If you want to get the UUID of a referenced object, you can do exactly as above by getting the referenced object and then calling .handle on it. Here's an example of getting the UUID of a layer in a construction:

image description

Edit 2:

If you want to get the UUID for a generic IdfObject, instead of calling foo.getString(4).get, you can call foo.idfObject.getString(4).get.