Excel to Dynamo for Space Programming

I have made it to the end of my Dynamo script and I can’t figure out why I am getting warnings. Can someone take a look at my script and tell me where I am going wrong? I am trying to take an excel doc and turn it into a color coded space programming document in Revit.

Space Planning Definition-GVCC.dyn (126.6 KB)

Got the excel file? Rebuilding one that matches your data structure would be awkwardly time consuming…

2 Likes

Yes I do. Here you go.
GVCC Space Needs Analysis 2.xls (149 KB)

For starters, can you post what the error messages are staying? For two, it looks like you are grabbing the item at Index 0 for all of your parameter sets. Are they all the same value? And for the True/False, you need to use 1 or 0 if it’s a checkbox I believe.

SeanP
Previously I had different values plugged in for the parameter sets and the GetItemAtIndex was failing. When I changed the value to zero it was no longer failing. For the True/False what would I plug the 1 or 0 into?

Ok, so does the family have all of those instance parameters spelled the same including case? The error is pretty straight forward saying that the parameters aren’t there for some reason.

The 0 or 1 replaces the True/ False. 0 would be False and 1 would be true.

1 Like

How would I go about finding the parameters that I need?

You need to look at the families and see what parameters they have and which ones you are trying to set.

2 Likes

JacobSmall, were you able to take a look at the file?

Haven’t yet - been a busy few days. It’s in my weekend list to check though.

1 Like

Looked at this now, and find I’m getting a failure on the FamilyInstance.ByPoints node as I don’t have your family in my Revit file. Can you provide the family you’re using as well? Note that @SeanP already pointed out that the family you’re using may not contain the names you are using in Dynamo, which would cause this behavior exactly. Make sure the parameters are in the family with matching names (spelling and capitalization matter) before you post the file.

1 Like

Digging further into this to see if there was other stuff I could resolve without the family. I’m seeing a BUNCH of data management techniques which are slowing things down too. Any reason you’re not using so much List.Map functionality instead of leveraging list lacing and levels? Doing so would reduce the number of independent functions and likely save some compute effort.

I’m concerned you may get some unintended results on this. You should also clean your excel file by deleting the unwanted cells. The one you sent over had something like 250 ‘null’ values when read programmatically.

Also, I’m a bit curious if what the intended use of the “Use Maximum Radius” instance parameter is. Can you let us know what you’re using that for in either this or the larger workflow?

Jacob,

To be honest I just found this script online and was trying to make it work for our office to use on future projects. I don’t know much about Dynamo but I’m trying to learn as I go. I’m really just trying to find a script to run that will provide me a series of boxes that we can use pre-Schematic Design. I found a website that had images and a script that resembled what I was looking for so I tried to replicate it but that doesn’t mean I am stuck to that script. If you have a better solution for me to solve this please let me know. I have attached the website that I am referring to.

http://www.martinportfolio.com/blog/2016/11/29/space-planning-update

Thanks for your help!

Got it. Well, you don’t need 99% of those items then. The only parameters you have are color which you can map to the material as this does, width, length, height, and department.

As such I think you would be best suited to start new, not repurpose another graph. Before you even open Revit you should take a step back and document how you would do stuff manually. How I would go about the process:

  1. Open the data source.
  2. Find the first room in the data source.
  3. Get the rooms values into an ordered list (length, width, height, department, target area, adjacencies, spatial characteristics, etc).
  4. Place a Box family In the model.
  5. Set the family instances values for the data you organized in step 3.

Once you can do the above manually for a single item, you can try in Dynamo for a single item. Then try in Dynamo for a list of three. Then try in Dynamo for a list of 10. At that point you achieved your goal. But why stop there?

Then try in Dynamo to place them into the larger units, testing adjacencies and other spatial qualities and relationships. Then make Dynamo adjust those values to make varied results. Lastly make Dynamo optimizes the adjustments to get an optimal outcome. At that point you’re doing Generative Design.

The key take away from all that is that if you can’t do it manually for a single item, you won’t be able to do anything else. Start small and build up to your desired result.

Do you have a script that already works? I will try those steps that you sent me in the previous email, just trying to get something together quick for this project.

Thanks!

I went through a similar process a few years back, the image you have looks identical to the one I followed. Try using this family in your graph
Space_Planning_Mass.rfa (728 KB)

I have developed several with other customers, none of which I’m at liberty to share at this time as they are something which were paid for. If you show a start to something I can help to guide you along but I cannot do it for you. The .rfa which @chris5 posted or a similar family (they’re REALLY easy to build up to your needs) is a first step. The Dynamo file which places the families and sets the values for the parameters of the file is fairly straight forward, and can be built from concepts which are shown in the dyn you placed. Give it a shot - I think you’ll surprise yourself. :slight_smile:

1 Like

I agree with @jacob.small that the point of the forum is to provide help and guidance. I think that the references regarding this topic already on the forum would be a good place to start, especially if you are new to dynamo. I cant find the exact link that helped me get going, but the links below should provide enough guidance to get your script up and running. Hope This helps!

https://dynamobim.org/space-planning-data-cycle/

https://dynamobim.org/home_usecases/use-case-1/