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

How Do You Search Local BCL Components Using API With C# Bindings

asked 2016-04-29 12:18:27 -0600

pflaumingo's avatar

updated 2017-10-18 07:07:59 -0600

How do you use the searchComponents method of a local BCL instance? It takes two string arguments; one for the search term and one for the componentType. What is component type exactly? Is it something like "OS:Fan:VariableVolume" or something else?

I'm using the C# bindings and am getting a reference to the local instance using: var localBCL = LocalBCL.instance()

Checking the path it seems to exist, but I can't seem to get the search to return any results. Does anyone know what the componentType input should be? Also, does the search term need to be an exact match or just partial?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-04-29 13:48:56 -0600

Component type corresponds to the Taxonomy ID (TID) defined on the BCL. I think there is a way to get this from the BCL, OpenStudio uses a list of TIDs defined here.

This unit test is also useful as an example of how to search the Local BCL. There is an attribute named "OpenStudio Type" that allows you to search components by OpenStudio type.

edit flag offensive delete link more

Comments

@kflemin or @Alex Swindler might be able to provide more details

macumber's avatar macumber  ( 2016-04-29 13:51:27 -0600 )edit

Looks like this might also be a bug, https://github.com/NREL/OpenStudio/is...

macumber's avatar macumber  ( 2016-04-29 15:17:42 -0600 )edit

@AlexSwindler test

Alex Swindler's avatar Alex Swindler  ( 2016-04-29 15:20:14 -0600 )edit

@alex-swindler test2

Alex Swindler's avatar Alex Swindler  ( 2016-04-29 15:27:47 -0600 )edit

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2016-04-29 12:18:27 -0600

Seen: 303 times

Last updated: Apr 29 '16