Exporting Furniture Count and Manufacturer Name to Excel

revit
excel

#1

I am working on a script to export Furniture data to excel (and in return import that data back to revit). I am able to export any of the type parameters but the quantity or any instance parameters (Manufacturer Name) export as a blank. I have the strings spelled correctly. Do I need to use a different node to get the instance parameter values? Any ideas of what I am doing wrong?


#2

Hi,

Try removing the FamilyInstance.type node and attach the output of the watch node directly to the GetParameterValueByName nodes.

Marcel


#3

I’d try @Marcel_Rijsmus solution before going further. I’m on the Revit-Excel-Revit adventure myself and that node is what’s different so far.


#4

@abutterfield
count is not a parameter, you need a NODE called COUNT below as an example on how you can do this, there are of course couple of ways to do this.

For the manufacture name should just be manufacturer instead? see below.

let me know if this works.


#5

@abutterfield said “I have the strings spelled correctly.” So there was no reason to doubt, but yeah, why not use this parameter? Screen shots are always better for help! :wink:


#6

When I tried this solution the Count did not show up and the “Manufacturer Name” one showed up as “Element” in the excel column.


#7

I made a instance parameter called “Manufacturer Name” that is linked to a schedule which automatically fills in the Manufacturer Address. When I set this up (years ago) I was only able to do it as in instance parameter. I have not revisited using it as a type parameter recently but it may be something to look into. But that is the reasoning for not using the “Manufacturer” parameter already loaded into the family type.


#8

@abutterfield did you try @Marcel_Rijsmus suggestion?


#9

@4bimferdie.espiritu I was unable to find the node “List.CountOccurences” but found a node called “List.Count”. I tried running the script with that but came up with an error on the List.Transpose which said "List.Transpose operation failed. Unable to cast object of type ‘System.Int32’ to type ‘System.CollectionsIList’.


#10

@Jonathan_Roy I tried @Marcel_Rijsmus suggestion and the count still showed up as a blank excel column

and the Manufacturer Name showed up in excel saying “Element” in the column


#11

@4bimferdie.espiritu in reply to your comment about the Manufacturer Name:
I made a instance parameter called “Manufacturer Name” that is linked to a schedule which automatically fills in the Manufacturer Address. When I set this up (years ago) I was only able to do it as in instance parameter. I have not revisited using it as a type parameter recently but it may be something to look into. But that is the reasoning for not using the “Manufacturer” parameter already loaded into the family type.


#12

Hi,

You are mixing up Instances and Types in this workflow, try separating them first.

For Instances start with categories and all elements of category.
For Types start with Element.types and all elements of type.

Maybe you can direct these two flows to one flow later in the graph
Marcel


#13

This is how I isolated the Type parameters


#14

@Marcel_Rijsmus I have been using the “Catagories” to “All Elements of Category” to get the type parameters successfully into excel. Though this was not your direct solution, I tried using the “Element Types” to “All Elements of Type” to get the instance parameter and it showed up as a blank column in excel.


#15

@Jonathan_Roy Have you had any luck isolating instance parameters. I have been able to work with type parameters fairly easily using something similar to yours. It is the instance parameters that are throwing me for a loop.


#16

@abutterfield I hope I’m in the direction your looking for!

-Changing the Instance parameter in all Type families

-Changing the instance parameter in one selected family

- Demo


#17

@abutterfield
Hi…i think what you trying to do is your mixing count with list. This is not possible on your current setup. First you need to decide.

A. You get a list from revit to excel as what you are doing and from excel you do the counting.

B. You get a list Count of all furniture to excel, like a total count.

C. Export a schedule to excel (not via dynamo)

To explain further you trying to feed count to a list of dimension, manufacturer etc. which are string/text in format.

You just need to choose A or B. I forgot the package where i got the countoccurances node. I will post it tomorrow so you can download it.

Hope this will help.


#18

@4bimferdie.espiritu I currently have it set up at Opt C. But this is only a one way feed (Revit to Excel) and my end goal is to be able to make changes (not to the quantities) in excel and be able to feed it back to Revit and vice versa. Opt B would not work because I need a count of each item and not a total of the furniture. Would option A be a manual counting or would it be automatic? Are you also saying there is no way for Dynamo to get the quantities of an item and push that data into a designated excel cell?


#19

@abutterfield
Yes there is always a way, just more nodes etc.

Just to be clear you want to have a total of each furniture and also its manufacturer’s name from Revit to Excel in one workflow? Then if you want to change furniture’s info you will change it in excel and feed it in to Revit via Dynamo?

I think it will be best if you can provide excel example and the graph you have so far. There are a lot of Revit to Excel and Excel to Revit query in the forum. There are many ways to deal with this, this is because the answer you will get depends on who’s giving it to you, some may do it via python, custom nodes and built-in nodes. I normally tried to use built-in nodes so it will be clearer.

Anyways I will try to help you as much as I can, so if you have example files it will greatly help.

Again everything is possible, just the timing is always problem.


#20

Hi,

You will need the Element Unique Id to write your data back to the same instance -in Revit- it came from.
Use search in this forum, this has been solved already.

Marcel