I am needing some help.
I’ve got a set of ‘parent’ generic annotations. I am wanting to populate my drawings with child annotations where I just set the number. Then when I run this script it looks at the parent annotations and sends the text parameter contents to the matching child annotation.
In my script I have them filtered, I’ve created a dictionary using the parent type, and I can seem to get it to update (1) instance of each child type, but I can’t get it to update all of the instances of the child types.
Can someone help me figure out where I’m going wrong?
update annotations_script.dyn (73.4 KB)
Sounds like a lacing issue.
Sadly I don’t have a ready built .rvt to test on, but try setting lacing on the “set parameter value” node which controls the values for the children annotations.
If that doesn’t work, provide a sample rvt file with nothing 3 parent and 10 child annotations (unevenly distribute them on the parents) and I’ll have a look. 
1 Like
So auto and longest lacing for that node spit out the same lists.
Below the working file. Thanks for the help
LINK
Can you make the download public please? I don’t have a public google account to use there.
Try the link again, I set it so anyone clicks the link it should work. I used drive because I couldn’t get the Revit file under the req’d 10mb.
I forgot to mention the parent types are in a legend view and the child types are in an elevation view.
1 Like
Resurfacing this thread to see if someone could help me out. The script works like it should, taking parameters from the parent family and sending them to the child family. This issue is that it only populates the parameter of the first child in the list, not all of them. I’ve tried messing with lacing, but didn’t help.
Here is a link to a folder with a sample file and dynamo script.
Here is an image showing the list with multiple items, and the node it’s going to only showing (1) item.
Thanks
You’re using a different list for getting the dictionary value than you are for setting the value back to the element. We can’t see what your parameter output looks like, but I’d bet it doesn’t align with the elements you’re writing to. You’ll want both lists to match in length and structure so that you have a 1-to-1 relationship for the easiest time.
My intent was that I had a long list of parents and I paired it down by using the intersection node. I then have (2) lists that are the same length (in terms of the instance of that family type) and in the same order. So then I use the data from the parent list and apply it to the child list. You can see in the child list there are (4) instances of item 2. So the data from the parent list for item 2 would populate for all of the child items at item 2.
1 Like
You’re asking us to make a lot of assumptions without showing that information. For any screenshot, it’s always best to include all node preview bubbles (or Watch nodes) for every node/output you have so that we have all the same context you do.
Post a new screenshot with all the info included and we’ll be able to give you some better suggestions.
This is giving you a filtered list from uniqueKeys, which I think is what you want. But you’re then providing the full list of elements from groups when writing the values back. I think that’s giving you a different length of lists. It’s also getting you one value per group which is the issue with lacing you’re having. That would be fixed by replicating the value for each item in the group so that you have your 1-to-1 relationship between lists.
Here is a larger screenshot using ‘export as image’. How do I go about replicating the value for each item in the groups?
Just FYI, it seems like the intersection node is unnecessary if you’re just filtering to the list of uniqueKeys.
Your list structure makes all the difference in what is even possible through lacing or list levels. If you flatten your list of values (your dictionary probably doesn’t need to be list values anyway) then you can use list levels to get the output you want.
1 Like