Updating Assembly Codes from Excel, Persistent Issue with System Families HELP

Hi, a Dynamo novice here. I need to automate the assignment of assembly codes to multiple types in models. However, I’ve been struggling for days to build the routine without success, especially with elements that belong to system families.

The first thing I did was generate a quantification table in a sample model, which I later exported to Excel. This file contains columns for categories, families, types, and corresponding assembly codes. I then put together the routine using what I found on the forum about similar topics. However, I always get stuck at the point where I need to extract the types of system families. I’ve tried using package nodes (Clockwork and Springs), but when I connect them, they only return null values. I also tried Python scripts, but I still can’t retrieve the types of system families.

I will attach the Dynamo and Excel files to this post. I would greatly appreciate your help, as I really want to make this work.

Best regards, and thanks in advance,

CODIGOS DE MONTAJE.dyn (63.8 KB)

CODIGOS DE MONTAJE.xlsx (13.5 KB)

what is the error shows?

If you are just looking to Export and Import to and from Excel, just use the DiRoots One plugin. It’s much easier than figuring this out through scripting.

Hi! More than exporting to Excel, I’m interested in modifying the assembly code parameter based on an Excel file. The problem I’ve encountered has been accessing the types of system families.

Hi! I have many errors, haha, but I’ll zoom in on them for you!

Yes, so make a schedule → export to Excel with DiRoots One
→ make your changes for the assembly codes in Excel
→ re-import the schedule through DiRoots One

1 Like

Post a full screenshot with the node preview bubbles pinned so we can see what you’re dealing with. Also, make sure the node names are visible when you export. We’re having to guess and piece things together at the moment.

Loadable families and system families are structured differently. It looks like you’re having issues with nulls, likely due to treating system elements like loadable ones. You probably need to filter first or use the “failed” instances as the filter if that really is the case.

Hi, thanks for the idea, I’ll keep it in mind if I can’t get out of this!

Thank you, I understand.

Hi! Sorry, this is my first post, I didn’t realize it, haha. I tried to edit the post, but it seems I can’t do that anymore, so I’ll upload the images here. I think the problem I’m having is exactly what you mentioned about handling loadable families and system families. I’ve read similar posts on the forum related to assembly codes where others have had similar issues with system families, but I haven’t found much information on what approach I can take regarding this.


I started with importing the data from Excel.

At first, I followed this post from the forum and successfully managed to update only the codes for loadable families.



In a second attempt, I followed a collection of things that had been discussed in other posts about assembly codes.

Here, the “category not found” error seemed strange to me; I checked the model, and the category is clearly there.

In the “All Elements of Category” node, I could already notice that system families were the only ones where I couldn’t see the type name.

I’ve read other posts where they mention the “GetAssemblyCodeTable Method” and various Python scripts, so I’m really not sure if I can achieve it.

Thank you for your interest, and sorry for my English!


DiRoots One


After installing, you can export any Schedule. When you export, all instances will be named so you will get a big Excel list

Make the changes in Excel and export WITHOUT keeping the formatting of the Schedule. This way DiRoots gets the elements into excel and you can import any changes back.

Now after making the changes in Excel

And that’s the result. You can do the same for Assembly Codes :slight_smile:

Trust me it will you save you so much time doing it this way.

You’re getting nulls from the Category and from the Family/Type mapping. We’d need to see the names that are failing to help you with either of those but the Family and Type mapping won’t work for Systems as they don’t have Families or (Family) Types like that node is expecting.

Using All Elements of Category will get all the instances that exist in your model. That will include duplicates of each type (which are unnecessary) but also miss out on any types that haven’t been placed yet. That will require additional cleanup, but it will work, and you can use the same method for both Families and Systems using the ElementType.ByName node.

The better option however, would be to get the Types directly, but that would be easiest using Python.

3 Likes