# Parameter with value in new window - Set parameter value?

**URL:** <https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439>\
**Category:** DesignScript\
**Created:** [September 3, 2023, 12:03pm UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439 "2023-09-03T12:03:16Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![AeM\_86](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aem_86/32/153058_2.png) [@AeM\_86](https://forum.dynamobim.com/u/AeM_86)\
**Post date:** [September 3, 2023, 12:03pm UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/1 "2023-09-03T12:03:16Z")

</div>

Hello,  
In duct fittings is the possibility to change loss pressure method to “specific coefficient”.  
If I change this parameter below I have “Loss pressure method settings”.  
If I click I have new window there I can write some value.  
But I want fill this value by Dynamo calculations.  
Set parameter value is not working. Is it possible to fill this value by Dynamo?

 ![obraz](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/8/c80aabc9a55282deed70fb76fb54a3cdc63e26fc.png)

---

<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:** [September 4, 2023, 4:48am UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/2 "2023-09-04T04:48:00Z")

</div>

Hi @AeM_86,

Which Revit Version you’re using?

Similar topic is discussed here:

> [@MEP - How to set dialog box values](https://forum.dynamobim.com/t/mep-how-to-set-dialog-box-values/2763/4):
>
> [Untitled1]

---

<div class="post-metadata">

**Author:** ![AeM\_86](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aem_86/32/153058_2.png) [@AeM\_86](https://forum.dynamobim.com/u/AeM_86)\
**Post date:** [September 4, 2023, 6:12am UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/3 "2023-09-04T06:12:42Z")

</div>

Hello @Kulkul  
Thanks for reply.  
I use Revit 2022  
Ok, I"ll see later this topic and give feedback  
but unfortunately I don’t know Python language

---

<div class="post-metadata">

**Author:** ![AeM\_86](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aem_86/32/153058_2.png) [@AeM\_86](https://forum.dynamobim.com/u/AeM_86)\
**Post date:** [September 4, 2023, 7:39pm UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/4 "2023-09-04T19:39:36Z")

</div>

@Kulkul  
All right, I check Your python script but it has some problems:  
1 - Coefficient is change for that I want (cool) but pressure drop is not calculated 0.000 Pa  
But If I change coefficient without script, by hand pressure drop is calculated at once.  
Later If I change “loss method” by hand on Ashrae table and go back to script and try again  
pressure drop is calculated… something strange.  
 ![obraz](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/f/1f395fd3ea161ebb09e326d9f1d239d71fd2543d.png)  
2 - If I calculate fitting f.e by coefficient “10” - like is set in script at start and then change  
for example from 10 to 5 coefficient is set correct but pressure drop still for coeff 10.  
But if I change it by hand Revit calculate pressure drop correct at once.

 ![obraz](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/7/273ad129096fce07a8eceac215fb2075ec1090d8.png)  
 ![obraz](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/2/e2dce461283c3bce3aa2bbff7c80b21953a0d50a.png)

Generally this script is exactly that I want :slight  
I want set parameters for more elements at once.  
I see that this script is write by python 2. But if I change to python 3 is still the same.

 ![obraz](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/9/b9b7f910e974e0a6bf3dd9a5f61e6e28d039ddb2.png)  
Regards

---

<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:** [September 5, 2023, 2:44am UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/5 "2023-09-05T02:44:08Z")

</div>

> [@AeM\_86](#):
>
> I use Revit 2022

> [@AeM\_86](#):
>
> I want set parameters for more elements at once.

You can change in Revit itself for multiple elements?  
 ![Coefficient](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/8/58319ffd27a3367e66fe109386166a348d9a5b6f.gif)

---

<div class="post-metadata">

**Author:** ![AeM\_86](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aem_86/32/153058_2.png) [@AeM\_86](https://forum.dynamobim.com/u/AeM_86)\
**Post date:** [September 5, 2023, 4:18am UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/6 "2023-09-05T04:18:47Z")

</div>

Yes, but I choose fittings by dynamo, because for every fitting and every type of fitting the coefficient will be different.  
Is not a problem now.  
Only one problem is that, if I run Your script, coefficient is changed but the “pressure drop” is not calculated at once. This is key for me, because if I’ll have f.e. 50 different fittings in project I want set this coefficient by one click not by hand for every fitting.  
The same problem for this script is mentioned at the end of topic that You’ve quoted.

---

<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:** [September 5, 2023, 6:28am UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/7 "2023-09-05T06:28:39Z")

</div>

> [@AeM\_86](#):
>
> I choose fittings by dynamo, because for every fitting and every type of fitting the coefficient will be different

> [@AeM\_86](#):
>
> if I’ll have f.e. 50 different fittings in project I want set this coefficient by one click not by hand for every fitting.

Is this what you need?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/7/772a64caeee1fa6882ede4aa32b410782faf16f2.png)

---

<div class="post-metadata">

**Author:** ![AeM\_86](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aem_86/32/153058_2.png) [@AeM\_86](https://forum.dynamobim.com/u/AeM_86)\
**Post date:** [September 5, 2023, 7:43am UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/8 "2023-09-05T07:43:17Z")

</div>

Exactly, this is what I want to achieve.  
But only one problem is that If I set this coefficients to every fitting, pressure drop is not calculated automaticly.  
Maybe in this script “inputs1” must be numbers and not strings?  
In previous script from topic that You quotes input 1 was wrote as “10” not as 10.

---

<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:** [September 5, 2023, 9:48am UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/9 "2023-09-05T09:48:21Z")

</div>

> [@AeM\_86](#):
>
> only one problem is that If I set this coefficients to every fitting, pressure drop is not calculated automaticly.

Could you drop here sample rvt file?

---

<div class="post-metadata">

**Author:** ![AeM\_86](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aem_86/32/153058_2.png) [@AeM\_86](https://forum.dynamobim.com/u/AeM_86)\
**Post date:** [September 5, 2023, 12:03pm UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/10 "2023-09-05T12:03:49Z")

</div>

Off course. [WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free](https://we.tl/t-xx0675IGGB)  
If You choose ventilation fitting circular bend in the properties You can see pressure drop 1.515 Pa.  
Defaul in Revit this value is calculated by Ashrae Tables. See two rows above pressure drop.  
If you run script loss method is change from “ashrae table” to “specified coefficient” f.e. 10  
After that pressure drop must change to 131.81 Pa.  
But if I try run script yesterday coefficient was change but pressure drop still the same 1.515 Pa. And it is wrong.  
If I change this method manually pressure drop is calculated ok. By script not.

 ![Bez tytułu](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/f/cf79d888a884ce9d42e3ff7049eb70a0c3fd312a.jpeg)

---

<div class="post-metadata">

**Author:** ![AeM\_86](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aem_86/32/153058_2.png) [@AeM\_86](https://forum.dynamobim.com/u/AeM_86)\
**Post date:** [September 5, 2023, 6:05pm UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/11 "2023-09-05T18:05:07Z")

</div>

How can I change this script to iputs [1] will be numbers not strings?

---

<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:** [September 6, 2023, 6:05am UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/12 "2023-09-06T06:05:13Z")

</div>

> [@AeM\_86](#):
>
> How can I change this script to iputs [1] will be numbers not strings?

You can’t add as numbers, Storage Type is string not number. I’m converting it as strings in my code.

> [@AeM\_86](#):
>
> if I try run script yesterday coefficient was change but pressure drop still the same 1.515 Pa. And it is wrong.  
> If I change this method manually pressure drop is calculated ok. By script not.

Is this what you need?

---

<div class="post-metadata">

**Author:** ![AeM\_86](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aem_86/32/153058_2.png) [@AeM\_86](https://forum.dynamobim.com/u/AeM_86)\
**Post date:** [September 6, 2023, 7:15am UTC](https://forum.dynamobim.com/t/parameter-with-value-in-new-window-set-parameter-value/93439/13 "2023-09-06T07:15:05Z")

</div>

Exactly this is what I want to achieve.  
Could You share me this python script?
