DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.67k stars 622 forks source link

Selected category / element type is not always remembered across Revit versions #3055

Closed andydandy74 closed 8 years ago

andydandy74 commented 9 years ago

Nodes that include a dropdown in their UI seem to store their selected value based on the indices of the available options in the dropdown, e.g. in the Categories dropdown it might look like index="894:Walls". Since different Revit versions have different numbers of categories or perhaps even element types one may currently lose the originally selected category when opening a graph on top of a different Revit version. It would be very helpful if both Categories and Element Types were identified by their respective names instead of their order in the stack as the name property is actually less likely to change from one Revit version to the next. Some use cases that are affected by this issue:

ikeough commented 9 years ago

Thanks @andydandy74. This is a known issue. Originally, we only stored them with the index, and this didn't work between Revit versions (i.e. 2014,2015). So we added the extra "hint" of the name. Because many of those drop-downs are populated with enumerations from the Revit API, there is no guaranteed way to store the selected index of a drop-down to ensure that it lines up with all other versions of Revit.

andydandy74 commented 8 years ago

Seems to work now, at least between Revit 2015 and Revit 2016