Data-Shapes: Nested Values

I will preface this by saying I have been able to fix this specific problem by reorganizing and rewriting some code for the new version, but it’s still an issue for other use cases. Plus, it means maintaining two versions of the same graph.

Background: I have a script where the designer chooses which disciplines are in the project and therefore which discipline specific views need to be created. In this example, most disciplines have one equivalent subdiscipline except for Refrigeration which has two.

Problem: In older versions, ListView would allow nested values for each discipline key which in turn allows for one UI Input. This meant that there would be one input box with a list of all the disciplines to be selected. In newer versions, ListView doesn’t seem to take discipline keys with nested values as a list, but rather as individual inputs, so now I’m left with one input per discipline.

Older versions:


Newer versions:

Does anybody (@Mostafa_El_Ayoubi ) have any idea on how to make this work as a single input again? I’ve had no luck with list levels so far.

Revit 2020 - Dynamo 2.12 - Data-Shapes 2022.2.96 (last version with IronPython2)

1 Like

What version of Data-Shapes are you using @Nick_Boyts, and what version of Revit?

Oops. Original post has been updated.

Not sure which version we’re still using on older graphs. We basically broke it off so that some of the graphs would continue to work in previous versions of Dynamo, but 2022 has a deprecated property that’s specifically forcing us to use the updated version of Data-Shapes.

The more I look at this, why are the values ALL nested to begin with? Don’t you just need the on grouping of 2?

For consistent list structure and for the flexibility in case we have to add additional subdisciplines to any group.