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

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

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

pflaumingo's avatar

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

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

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

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


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

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

Looks like this might also be a bug,

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

@AlexSwindler test

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

@alex-swindler test2

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

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


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

Seen: 271 times

Last updated: Apr 29 '16