I am working on a script that will create a Note Block Schedule for each sheet the user selects with Data-Shapes UI.
The user chooses the sheets and a note block family.
So, I have a list of sheet elements and a family to work with.
I am using the GeniusLoci Create Note Block Schedule node. That just takes the note block family. I then use Element.SetParameterByName to change the name of the schedule to the Sheet Number. How would I run that multiple times for each sheet in the list and then change the name of each schedule created? I’d then also set a filter on each of them based on the sheet number.
In the end, each sheet the user chooses will have a filtered schedule placed on it.
The looping and sequencing is confusing me. (Always has with Dynamo vs code-based languages)
Look into List Levels. It’s all about controlling your list application to the nodes (and how individual nodes handle lists in some cases).
But I’m not sure how to connect a list to the node that creates the note block schedule. Do I need to create a list of the note block family the same length as the sheet list?
Yes, exactly. If you need two schedules then you need to supply two inputs (families).
Gotcha. And would you then capture all the schedules into a new list that matches the indices of the sheets list to then do the schedule naming and filters?
Yup. It’s all about maintaining the correct list structure/length and applying the appropriate list levels where necessary. If you haven’t gone through the Dynamo Primer yet I highly recommend it. It should cover a lot of this.
It can be tricky at first, but once it clicks it’s super powerful.