DataShapes UI drops some items

Hello Dynamo Community :slight_smile:

I´m putting in 7 walls and 6 floors into the UI but only 5 walls and 4 floors show up and i can´t select the missing ones. I have to run the script again, then the missing ones show up. Please note that the count is right (7 walls, 6 floors):

Set Structural To Yes.dyn (162.0 KB)

So where are my missing items? :thinking:

And a bonus question to this UI, i have outputs if the UI did run or if it was canceled, but what if a user closes the UI window? Any chance i can the script stop from running the next UI?

Kind regards!


Here the keys and values…so can this really be true that items are dropped if the keys are equal? :open_mouth:

It is “dropping” duplicate items. If you notice the two values being dropped are those that have the same two Keys with the same name (IW 01_STB_0500, and GeDe_STB_0300_innen) I believe.

1 Like

If the window is closed then WasRun and WasCancelled will both be false. You just have to be smart about how you control these scenarios.

Absolutely. But the objects aren’t being dropped, they’re being replaced. A key is a unique identifier. You can’t have duplicate keys.

1 Like

Ok, so what would be the best solution for me now? I would guess adding the element ID to each key? Or am i missing something?

Are you sure nick? I tried this multiple times, for me closing the UI window always gives the output “was run” = true.

I already got creative with “was run” and “canceled” outputs. But i can´t get the info if it was closed.

That depends on what you’re trying to do. What’s the difference between IW 01_STB_0250 and IW 01_STB_0250? The key is what let’s you know what you’re selecting, so whatever the identifier ends up being it needs to make that distinction. ElementID is likely unhelpful because a user won’t readily know which ID goes to which object.

This may be a newer feature and I could very well have been wrong about that. My Data-Shapes nodes do not allow me to close the window prematurely.

1 Like

Thanks for the explanation Nick, but for my intended use i think ID will do it, works great :slight_smile:

And relating to the “was run” output:

hmmm maybe a UI that was closed gives always an empty list!? and i can work with an is_empty node.

1 Like

Does the user just need ALL walls of a specific type / Family, or will they really know which ones to pick based on the information in the List View? What I am thinking is can you supply a Family and Family Type for the list Keys/Values then get all of that type once the user picks?

1 Like

The graph searches for all reinforced concrete elements, checks them for their structural parameter and puts out all Elements that have the structural parameter “no”. The user can then decide which elements to set to true. The family name would be enough for that, it´s just to make sure you don´t pick a wrong element ( for example insulation). So I´m fine with adding the ID :slight_smile:

And for the closed UI, i really think this will do it:

Edit: Or maybe not, there can still be empty lists if everything works, in my case the ceiling list would be empty if no ceilings were found. So thats not the way to go…

1 Like

Problem should be solved in the next release: