Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Querying BHoM representations of Revit types from parent objects could be unified #1342

Open
pawelbaran opened this issue Apr 5, 2023 · 0 comments
Assignees
Labels
type:feature New capability or enhancement

Comments

@pawelbaran
Copy link
Member

Description:

Currently GetRevitElementType method is used to query representations of Revit types from BHoM object representing Revit elements. This has 1 main drawback, being the developer needing to know that support for any new object type needs to be added explicitly to the method (e.g. @enarhi has a low chance of knowing about it while working on #1341).

Additionally, GetRevitParameterValue does not leverage GetRevitElementType, instead it parses all properties of the parent object looking for the one that has RevitPulledParameters fragment, which ultimately should give the same results.

Ideally, the 2nd solution could be encoded into GetRevitElementType to avoid requirement for manual support for each new type. Then it could be reused wherever needed.

I see two potential issues with such solution:

  • performance - parsing all property values in search for fragment would be way slower than simply returning the property bound compile time
  • existence of BHoM objects that have more than 1 property corresponding to Revit entities - here I can think of a Revit element with a type and nested element, which could possibly land under 2 different properties in the resultant BHoM object - a bit speculative but sounds like a potential risk
@pawelbaran pawelbaran added the type:feature New capability or enhancement label Apr 5, 2023
@pawelbaran pawelbaran self-assigned this Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant