Excel Roundtrip - Fill Patterns, Line Styles etc

I’m trying to clean up things like fill patterns and line styles and am a bit stumped on getting everything in and out of Excel. Starting with Fill Patterns (I assume the technique will be the same for other things?) I’ve managed to export the names to Excel, make a few changes and read it back into Dynamo but that is where I stall.

I would like to export element IDs and names so I can sort and look for duplicates and still keep the correct name with the correct pattern. I can get names or IDs to write but am missing something simple to get both out.

The other spot I’m completely stopped by is getting it back to the elements in the file. I can read the excel file in Dynamo but I’m not sure how to path it back to the elements. I’ve read through a few posts and at some point it all starts to look like greek =/ If the answer is in one of them I’m probably just brain-dead and missing it.






Couple of things that you can do to get started. Since I don’t like the OOTB Excel Read/Write nodes, I wrote my own and you can get them under package called Bumblebee. Please download that.

Then I will demonstrate a simple to and from excel using Bumblebee, but before we do that let’s get some data. You mentioned Fill Patterns so let’s work with that. First get all Fill Patterns in the project and since there isn’t a working category for it yet, we will use a Python node:







That will return a list of all Fill Patterns that are currently available in the Project:




Now we can extract their names and Id’s and join them into a single list





now let’s write that out to Excel using Bumblebee:






Now, we can do some stuff with that data in excel. For example change some names like so:




Then we can pull that back into Dynamo like so:


1 Like

now is the fun: let’s set the names and see if we can - I haven’t actually tried - LOL:

Damn, this proved to be a little bit more difficult than I thought. Anyways here it is:

First let’s break down our data coming back from Excel:





Let’s grab our id’s and convert them to integers so we can use them to extract our elements again:





Now, we can use archi-lab nodes to get an element by ID like so:





And lastly set the new names like so:



this is it:


1 Like

Thanks! I’ll try to go through in-depth later this afternoon. Until then I have a couple newbie questions:

Why use Code Block instead of a String & Number for the Sheet Name and Starting Col/Row?

What is the difference between using Categories and Element Types in the very beginning?

and I guess it would have helped if I posted what I had managed to come up with so far… Attached image is how I got the information out which (seems to) work fine.



Oh your method is actually better than using a custom Python node to do this. I didn’t check under Types but i guess it works. I will ask the dev team to take it out of categories dropdown since it doesnt work there. Good job on this one.

There is no difference between String Node and a Code Block that has “someText”. Difference is in my personal preference and immediacy of getting access to a string node where I have to search for it and it takes seconds longer than just double clicking on canvas to get a Code Block. :slight_smile: Those seconds add up and save you time eventually.



Thanks for the info on Code Block - I didn’t know I could double click to get one.

I’m looking at this and have a few stall points.

If I don’t use Python in the beginning it seems to keep the rest of the Python from working - I’m guessing the first segment defines everything for the entire file? Or am I doing something wrong since I’m trying to go through step-by-step so I can understand it instead of just copy & paste?

Without that first Python script I’m back to being lost on how to get things back in beyond reading the file :oops:

Also - is there any advantage to keeping everything in one file vs an Import & Export file? I can’t tell if it is possible to do this in one file without BB (not knocking BB - so far it is great, just curiosity on my end)

Hi! I looked answers on the forum. It was so close. In this thread is images that not zooming. Can you post .dyn script or old images in good resolution here?
I need to upload Fill Patterns to the project from Excel file.

1 Like

A little behind on this but wanted to updated incase anyone stumbles across it while searching. I did finally get this working, at least for fill patterns. Export and Import/Rename/Delete graphs attached :beers:

Manage-ExportFillPatterns.dyn (12.2 KB)

Manage-FillPatterns-DeleteByFilter.dyn (13.7 KB)

edit: stupid question - why do the images not expand out?


guessing it has to do with fact that your post was tacked onto something from a long time ago, and in the meantime the URLs for the forums have changed. There is a way of getting to old posts, but not sure about your new post. Interesting.

Because this thread was on the old forum. The original can be found here:

1 Like

Makes sense. Thanks

Stumbled across this looking for a way to extract a .PAT ‘drafting pattern’ from Revit to Excel. I made this fancy cover page for occupancy values, but it relies on the .PAT being converted to a .PNG (Manually) and inserting and defining the .PNG in EXCEL. Not really sure how I’d start breaking down a .PAT to get the scale/stretch relations, or what criteria a .PAT has available to Dynamo.

Hello there.
I am trying to use your dynamo script, but I do not have the package “Tool get fill pattern target” Do you know the name of the package so I can download it.

@mariaZW9XM That node would be from SteamNodes

thanks!! :grimacing: :+1: