-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Description:
In #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.