# Help Needed - Importing Cost into Family Types

**URL:** <https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355>\
**Category:** Revit\
**Tags:** revit, excel, dynamo\
**Created:** [October 15, 2021, 7:17pm UTC](https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355 "2021-10-15T19:17:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpreste](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jpreste](https://forum.dynamobim.com/u/jpreste)\
**Post date:** [October 15, 2021, 7:17pm UTC](https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355/1 "2021-10-15T19:17:07Z")

</div>

Hello,

I’ve been trying to import cost into specific family types from an excel file. Each family type has a unique cost associated with it and I need the family types to reflect the associated cost. The family (light gauge studs) has approximately 80+ types within the family. Each type needs a different cost based off the excel spreadsheet.

Currently I have the excel file being imported and transposed properly (I believe). From there it goes into Set.ParameterByName. While my script works fine, it seems very complex and large.

Is there a way to reduce the amount of items in my script to make it run and load quicker while easier to use?

Processing: Dynamo Script.pdf…

---

<div class="post-metadata">

**Author:** ![jpreste](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jpreste](https://forum.dynamobim.com/u/jpreste)\
**Post date:** [October 15, 2021, 7:17pm UTC](https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355/2 "2021-10-15T19:17:40Z")

</div>

![Capture3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/c/1c5a7d6d040efa7a4a3590141476277ce4ff1b3a.jpeg)

---

<div class="post-metadata">

**Author:** ![jpreste](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jpreste](https://forum.dynamobim.com/u/jpreste)\
**Post date:** [October 15, 2021, 7:18pm UTC](https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355/3 "2021-10-15T19:18:15Z")

</div>

![Capture1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/c/dc794fb1c98adf92e3f8847972dc725f34dff3cf.jpeg)

---

<div class="post-metadata">

**Author:** ![jpreste](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jpreste](https://forum.dynamobim.com/u/jpreste)\
**Post date:** [October 15, 2021, 7:18pm UTC](https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355/4 "2021-10-15T19:18:46Z")

</div>

![Capture2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/7/47c71f0adadaa52f7ebc03adadd65027979b0019.jpeg)

---

<div class="post-metadata">

**Author:** ![honeyjain619](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/honeyjain619/32/121215_2.png) [@honeyjain619](https://forum.dynamobim.com/u/honeyjain619)\
**Post date:** [October 16, 2021, 4:19am UTC](https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355/5 "2021-10-16T04:19:26Z")

</div>

Hello @jpreste ,

Yes you can do that, if you are able to map the excel row number with family type.  
because currently you are selecting the family type manually and mapping/ assigning the excel row number to it.

One way i can suggest is export the family type name in an excel and map the family type with cost.  
Then using dynamo “family type by name” assigning the cost.

---

<div class="post-metadata">

**Author:** ![m.owens](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@m.owens](https://forum.dynamobim.com/u/m.owens)\
**Post date:** [October 17, 2021, 12:16am UTC](https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355/6 "2021-10-17T00:16:09Z")

</div>

I agree with honeyjain. You can include the type name (or some other parameter value) as a key to have dynamo connect the data.

I can provide an example of needed.

If your are using dynamo to do cost-estimations based on model-quantities, it might be easier to build an excel file which calculates the data based on revit exports.

---

<div class="post-metadata">

**Author:** ![jpreste](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jpreste](https://forum.dynamobim.com/u/jpreste)\
**Post date:** [October 18, 2021, 1:21pm UTC](https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355/7 "2021-10-18T13:21:02Z")

</div>

Yes that would be very helpful with an example. I’m going to try what honeyjain stated, Thank you both very much.

---

<div class="post-metadata">

**Author:** ![m.owens](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@m.owens](https://forum.dynamobim.com/u/m.owens)\
**Post date:** [October 18, 2021, 11:16pm UTC](https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355/8 "2021-10-18T23:16:50Z")

</div>

I used walls in this example, and out-of-the-box parameters. You may need to adjust your script as needed. Let me know if you run into issues.

 ![Write Cost Info from Excel](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/6/46a6d4f2f7ad59232e9405f16f88831761be8081.png)

 ![grafik](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/8/680c39be80e01b2c3b6e5412b00abbb2fd41f24b.png)

---

<div class="post-metadata">

**Author:** ![aaronrumple](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aaronrumple/32/195292_2.png) [@aaronrumple](https://forum.dynamobim.com/u/aaronrumple)\
**Post date:** [October 19, 2021, 1:32pm UTC](https://forum.dynamobim.com/t/help-needed-importing-cost-into-family-types/69355/9 "2021-10-19T13:32:26Z")

</div>

> [@jpreste](#):
>
> eflect the associated cost. The family (light gauge studs) has approximately 80+ types within the family. Each type needs a different cost based off the excel spreadsheet.
> 
> Currently I have the excel file being imported and transposed properly (I believe). From there it goes into Set.ParameterByName. While my script works fine, it seems very complex and large.
> 
> Is there a way to reduce the amount of items in my script to make it run and load quicker while easier to use?

Of course if you made a type catalog for your families, the cost would be there any time you loaded the family in a project.
