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

Use AdditionalProperties instead of object name comparisons #1450

Closed
shorowit opened this issue Jul 26, 2023 · 0 comments · Fixed by #1456
Closed

Use AdditionalProperties instead of object name comparisons #1450

shorowit opened this issue Jul 26, 2023 · 0 comments · Fixed by #1456
Assignees
Labels

Comments

@shorowit
Copy link
Contributor

shorowit commented Jul 26, 2023

OS-HPXML originally had to rely on object names (e.g., Constants.ObjectNameFoo) in many situations to understand what building component a, e.g., ElectricEquipment or InfiltrationDesignFlowRate object represents. But this comes with some risk because object names may end up with various string prefixes/suffixes (e.g., if there are multiple objects of the same type), or get converted to snake_case, etc.

Now that the OpenStudio AdditionalProperties object exists, we should audit our code and start using it. It will eliminate this risk once and for all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
1 participant