BHoM / BHoM/BHoM_Engine

Reflection_Engine: Expose quantity attributes on enum values

Open
#3,421 0 comments 0 reactions 1 assignee Claimed by @IsakNaslundBh View on GitHub
type:feature
Dominant language
C#
Stars
30
Forks
13
Avg merge
7d 10h
Merged PRs (30d)
5

Description

#### Description:

Related to https://github.com/BHoM/BHoM/issues/1642

Add a couple of lines to this method:

https://github.com/BHoM/BHoM_Engine/blob/0471f52497ff5acc47f8e0540410e9c2e8a75b6e/Reflection_Engine/Query/Description.cs#L270-L298

Namely, add in the step
```
QuantityAttribute quantity = field.GetCustomAttribute();
if (quantity != null)
desc += $" [{quantity.SIUnit}]";
```

After the description attribute to allow for display of quantities relating to enum values.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.