I’m curious about how the code works in Dynamo. If I have two procedures that I want to run sequentially, but can’t find a way to make them into a single string, is there a way to say finish part 1 first then start on part 2.
Today’s specific application is I want to collect all the parameters of a family instance, then change the family instance to a different type, then set all the new parameters in the new instance to match the one that was there before.
I thought maybe someone would know more about the back end or have an idea on how to accomplish this. Currently all I can think of is finding a way to string the commands one after another, or use the “pause” node at each step, but that seems a little uncertain.
Assigning a new type to an element, should only change its type parameters. I think that all instance parameters should be preserved? Could you show us an example of your family?
I am actually changing the family, not just the type. This mostly becomes an issue with typical details or details borrowed from old projects where the families get out of date and need to be updated over time.
Timon, just a small addition. If you manage to create your graph in such a manner that operations are linked in a sequence you can actually get rid of the Function.Compose node altogether. We recently changed the way the Dynanimator nodes are composed to do precisely that and it works great. All you need to do is make sure that each opration links to the next operation (if you are using custom nodes you could just pass a variable through to the next node even if that variable is not necessary for the downstream operation. Here’s a graph that shows how it’s done:
Sadly, I’m just seeing this now, but the pass through nodes are genius! So, I could just use a code block with a couple pass through variables that would force the order of the functions. Example. If the “get value” needs to run before the “set value”. I could have a code block that reads the output from the “get value” and has a pass through for the elements. Thanks for the idea, I’ll try it out this week.