I managed to export my space information to excel where i inputted my space types. I am now trying to import this information back into the Revit model to populate the different space types (based on OOTB revit space types). For some reason my script doesn’t seem to work for anything but the space number and space name. Does anyone have any tips?
What error message is it giving you?
I get that same message whether i change the boolean node to true or false
Check the errors parameter storage types and then apply values as per storage types. You could check parameter storage types this way:
The error message is telling you that you need a different format than String as @Kulkul notes below. Since it is an integer storage type it is looking for an element ID of the storage type. You may need to get a list of Space Types and then filter your strings from Excel through to get the element of that space type. See this post for reference.
Brilliant, thank you guys! I will go back and try your suggestions in the morning
Ok so i checked all the bits you suggested and changed my boolean node to false and now i get a new error message
Ok so with a bit more digging i found that the Space Type parameter storage type is ElementID, i guess my questions is, how do i find out what the ElementIDs are for the different space types in revit?
If you follow Sean’s link, the next post down shows a method of getting the name from the type then you can go back to pick the one you want…
You could automate this by running the excel string into an ‘indexes of’ “name” then ‘get item at index’ from the types list.
Hope that helps,
Awesome so I could populate more than one space type by following that method but adapting to use excel?
I’m not at a pc right now so I can’t check, you might need to tweak… I’m sure others have better methods
Use the All elements of Type to get a list of the space types, then get thier name and compare that to the name from your Excel. You could use and if node to then build the list of corresponding IDs.
I tried all of what you suggested except the if node. How does that work to get IDs? Sorry I’m still a real novice at Dynamo but I’m trying to learn as much as I can
Something like this should work for you. Just plug the info from excel in where I have the “Active Storage” node.
This worked perfectly for getting all my space type element IDs. I added these to my excel sheet and tried bringing them into my original script to populate the space type parameters in my model but i am still getting an error
It looks like it may be looking for the actual Space Type (green highlighted piece) and not JUST the integer. Take the “Element.Id” node off the end of what I posted and see if that works for you.
nope that didn’t work either. I feel like i’ve not got the correct ID for the different Space Types built into Revit. From the class material at AU they seem to have IDs of 1 or 2 digits but this small snip of the excel is my only clue to how they populated the space type parameter. I have no clue what dynamo script they wrote or how they pathed the excel into it so i’m basically flying blind on the principle that if they can do it then there must be a way to automate the process!
It looks like they figured it out here. Have you tried this way?