Shouldn't TryGetValueFromSource return a tuple rather than parameter itself?
- Dominant language
- C#
- Stars
- 35
- Forks
- 16
- Avg merge
- 7d 29m
- Merged PRs (30d)
- 2
Description
#### Description:
In https://github.com/BHoM/Revit_Toolkit/pull/1546 together with @michal-pekacki we changed `TryGetValueFromSource(Element, ParameterValueSource)` to return `Parameter` as such, while as we both agree it would be better to return the actual parameter value. The reason why we did it this way is that in case of parameters with values of type `ElementId` we sometimes need to work with that `ElementId` and sometimes with its string representation, e.g. we have a wall that goes up to Level 2, then parameter value could have 2 values depending on requested format:
- ElementId: just Id of Level 2
- string: "Up to Level 2"
Former is better in any sort of data-driven workflows, but the latter is required for string-based filtering.
Now another idea that we have to return tuples in such cases, e.g. `(ElementId, string)` for the above or `(Enum, string)` for enums. That would be more understandable for the wider public as well as better aligned with the general concept.
Contributor guide
Assessment
This issue has not been assessed yet.