Hello everyone,
I am using data-shapes interface to place a family instance on a given point selected by the user and set some of its parameters. I want to repeat this process N times.
Is there a way to mantain the same data-shapes window and re-run it any number of times when the user change the inputs?
@s258085 ,
i just kno the automode from Dynamo. I do not use periodic…
No, I don’t believe so. Even if you could trick the UI nodes into executing more than once (which is technically possible but more of a run issue than an intended repeatable function), Dynamo wouldn’t commit to Revit until the entire graph completes. This would be like you changing your inputs multiple times before committing, rather than setting multiple independent inputs and committing all at once.
You could probably write your own code to prompt inputs in a loop but I’ve never tried that.
1 Like
Thanks for both of yours answer. And how can I change the input N times before commiting? I really dont mind if the UI dont place the family instance each time, but I would really like that the UI brings the possibility to the user to select multiple points, change the parameters and when the process is finished place the multiple family instances in its respective position with its respective values for parameters. I attach my graph and the UI so maybe it is a little bit more clear.
Hi there @s258085,
Ultimately this is possible but would require you to define n in the input dialogue box within the dynamo player window.
Datashapes nodes work like any other nodes in that they handle lists of lists for inputs and if setup correctly will then prompt you with as many input boxes as you have sublists.
@Nick_Boyts this wouldn’t mean an overwriting of the element values as the output is then just a relevant list of sublists containing the unique user input values from each unique UI input box (they are null in my screen grab as I did not select any inputs).
See GIF below demonstrating as well as an overview of the script and .dyn file.
(apologies for lack of cursor, my PC needs restarting I think)
Hope this helps.
forum Data shapes.dyn (42.0 KB)
Correct, but this is different from repeating N number of times. You can absolutely specify the number of inputs you want, that’s just standard functionality, but that’s not how I interpreted this question. An actual loop is not possible with the current node.
We need more information on how you’re expecting this to work. If you merely need to select multiple points then we can likely do that. If you’re needing different parameter values for different groups then you might as well just run the graph in Player multiple times rather than trying to create a looping prompt.
1 Like
Yup fair point, don’t mind me and my simpler interpretation of this question
1 Like
Thanks a lot for your answer! This is a really smart solution. It is a bit of a shame that the user needs to specify the number of instances to position at first, but for my case this solution completely works! Thanks again!