First time here? Check our help page!
2

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

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?

pflaumingo's avatar
1.9k
pflaumingo
asked 2016-04-29 12:18:27 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-10-18 07:07:59 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

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.

macumber's avatar
12k
macumber
answered 2016-04-29 13:48:56 -0500
edit flag offensive 0 remove flag delete link

Comments

@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, https://github.com/NREL/OpenStudio/is...

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
add a comment see more comments