# Using type parameters as input for Project Refinery

**URL:** <https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498>\
**Category:** Generative Design\
**Tags:** refinery\
**Created:** [May 28, 2019, 11:53pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498 "2019-05-28T23:53:54Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrthill](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jrthill/32/67461_2.png) [@jrthill](https://forum.dynamobim.com/u/jrthill)\
**Post date:** [May 28, 2019, 11:53pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/1 "2019-05-28T23:53:54Z")

</div>

Hello,

I’m trying to optimize window sizing using Refinery with Dynamo, Honeybee, and Revit, but keep running into problems. I can run a daylighting analysis using the honeybee test room Revit file, and an example (02\_daylight\_factor\_gridbased), and am able to change the height parameter of a window with the Rhythm package, but when I try to put the small chunk of code for changing the type parameter, the honeybee example won’t run

 ![successfull%20honeybee](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/3/835e409b1a2e4de8e0aa6c9a14b5d1a11b4c730d.png) ![Type%20parameter](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/b/4bdec8685b066f0c7dbd6765429917474a9b3786.png) . It seems that it only works if I close Revit and Dynamo before running again, and for Refinery to work it obviously needs to run multiple times. Does anyone know of a more stable way to do a daylight analysis, or know why I’m having trouble? Thank you!

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [May 29, 2019, 2:58am UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/2 "2019-05-29T02:58:03Z")

</div>

Hi @jrthill

> [@jrthill](#):
>
> It seems that it only works if I close Revit and Dynamo before running again

Have you tried running your script in Dynamo player?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 29, 2019, 5:30am UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/3 "2019-05-29T05:30:50Z")

</div>

Hmmm… if you’re after finding the optimum, using primitive geometries and a Data.Remember node might allow for processing in Refinery… I’ll try and take a look later (pretty busy if late though).

---

<div class="post-metadata">

**Author:** ![jrthill](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jrthill/32/67461_2.png) [@jrthill](https://forum.dynamobim.com/u/jrthill)\
**Post date:** [May 29, 2019, 11:55am UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/4 "2019-05-29T11:55:35Z")

</div>

Thanks for the quick reply, it does run multiple times without having to close in Dynamo player. The only problem is that I was planning to work with Refinery to optimize the window size, and I don’t think I can run Refinery in Dynamo player. Does this help with troubleshooting at all, or should I try to work my way around in Dynamo player? Thanks!

---

<div class="post-metadata">

**Author:** ![jrthill](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jrthill/32/67461_2.png) [@jrthill](https://forum.dynamobim.com/u/jrthill)\
**Post date:** [May 29, 2019, 12:04pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/5 "2019-05-29T12:04:13Z")

</div>

Thanks for the quick reply. I was also able to get the script to work with Refinery (it gave me data in a straight line), the problem is that it doesn’t update, even when I do it manually. In the second image I shared earlier you can see a set type parameter by name node, with which I’ve been changing the window sizes. I also added a watch section, shown in the first image, that records the number of grid spaces with low daylight factors ( \<4). This number updates if I close dynamo, change the height of the window, and run the code again. I think I might have to use that data remember node later on in the process if Refinery doesn’t like using that watch node as an output, but for now I just need the daylight analysis example to run multiple times without having to close in between. As Kulkul suggested, I ran the script in Dynamo player, and was able to do it without any issues, but I don’t think I can use Refinery from Player. Sorry for the paragraph, and thanks again!

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [May 29, 2019, 1:08pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/6 "2019-05-29T13:08:46Z")

</div>

I don’t believe there is a way to update Revit data with Refinery - that’s the whole point of Data.Remember.

I think @jacob.small and I have the same idea where you’d have to use Dynamo geometry to run your optimization but could use your Revit windows as a starting point.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 29, 2019, 3:25pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/7 "2019-05-29T15:25:54Z")

</div>

Exactly. Get the geometry of the types, adjust those rather than the types themselves.

---

<div class="post-metadata">

**Author:** ![jrthill](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jrthill/32/67461_2.png) [@jrthill](https://forum.dynamobim.com/u/jrthill)\
**Post date:** [May 29, 2019, 3:41pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/8 "2019-05-29T15:41:12Z")

</div>

Thanks guys. This is all helpful, but I’d still run in to that root problem, where I can only make that example code for daylight analysis that comes with honeybee run if I reopen Dynamo every time I run it. As I adjust that slider in Dynamo I see the size of the windows change, but the daylight analysis does not reflect it, unless I close and run it again. Would that remember node solve this?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 29, 2019, 3:54pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/9 "2019-05-29T15:54:48Z")

</div>

Got a DYN and RVT to share?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [May 29, 2019, 3:54pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/10 "2019-05-29T15:54:58Z")

</div>

I still haven’t gotten around to playing with Honeybee yet. I thought you could run it in Refinery but I guess that wouldn’t work if it runs off the Revit data. Does Honeybee require Revit objects as the input or is it just geometry?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 29, 2019, 3:56pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/11 "2019-05-29T15:56:34Z")

</div>

[https://mostapharoudsari.gitbooks.io/honeybee-primer/content/](https://mostapharoudsari.gitbooks.io/honeybee-primer/content/)

---

<div class="post-metadata">

**Author:** ![jrthill](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jrthill/32/67461_2.png) [@jrthill](https://forum.dynamobim.com/u/jrthill)\
**Post date:** [May 30, 2019, 2:31am UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/12 "2019-05-30T02:31:44Z")

</div>

Here’s what I’ve been working with

[02\_daylight\_factor\_gridbased.dyn](https://forum.dynamobim.com/uploads/short-url/wejnNqeCEwKGOzGn7TK69Y1Q8yX.dyn) (84.2 KB)  
[honeybee\_test\_room.rvt](https://forum.dynamobim.com/uploads/short-url/iqZWVpcRbAfNfJDud6y39Y77FzQ.rvt) (1.5 MB)

---

<div class="post-metadata">

**Author:** ![jrthill](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jrthill/32/67461_2.png) [@jrthill](https://forum.dynamobim.com/u/jrthill)\
**Post date:** [May 30, 2019, 2:33am UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/13 "2019-05-30T02:33:50Z")

</div>

This primer is for Grasshopper I think, I’ve been struggling to find much for Honeybee for Dynamo. I’ll go through it though, thanks

---

<div class="post-metadata">

**Author:** ![jrthill](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jrthill/32/67461_2.png) [@jrthill](https://forum.dynamobim.com/u/jrthill)\
**Post date:** [June 5, 2019, 2:07pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/14 "2019-06-05T14:07:40Z")

</div>

Do you know why this would work in Player but not regular Dynamo?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 5, 2019, 5:11pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/15 "2019-06-05T17:11:47Z")

</div>

Dynamo Player closes the graph and recreates everything from scratch each time you run it.

---

<div class="post-metadata">

**Author:** ![rsolomonV6](https://avatars.discourse-cdn.com/v4/letter/r/6bbea6/32.png) [@rsolomonV6](https://forum.dynamobim.com/u/rsolomonV6)\
**Post date:** [January 5, 2020, 3:53pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/16 "2020-01-05T15:53:47Z")

</div>

@jrthill

did you solve the issue? I am experiencing the same issue. Honeybee runs the simulation once only.  
Have to restart dynamo in order to run the simulation with new values.  
I believe that the reason why my outputs in Refinery are 0

---

<div class="post-metadata">

**Author:** ![jrthill](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jrthill/32/67461_2.png) [@jrthill](https://forum.dynamobim.com/u/jrthill)\
**Post date:** [January 31, 2020, 6:33pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/17 "2020-01-31T18:33:36Z")

</div>

Sorry for the late reply. I was not able to solve this issue and submitted my report saying that Dynamo and Project Refinery are not stable enough with Honeybee. I have been told that it is much better to work with Rhino and Grasshopper. My results in Refinery were static at whatever value I first set them at. I can share my report or code with you if you like.

---

<div class="post-metadata">

**Author:** ![rsolomonV6](https://avatars.discourse-cdn.com/v4/letter/r/6bbea6/32.png) [@rsolomonV6](https://forum.dynamobim.com/u/rsolomonV6)\
**Post date:** [February 5, 2020, 2:23pm UTC](https://forum.dynamobim.com/t/using-type-parameters-as-input-for-project-refinery/36498/18 "2020-02-05T14:23:39Z")

</div>

@jrthill  
Thank you for replay, I got some help on Ladybug forums. Got directed to Simon Breslav which was kind to help me out. His version of the package works with Refinery.
