Parameter with value in new window - Set parameter value?

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?

Hi @AeM_86,

Which Revit Version you’re using?

Similar topic is discussed here:

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

@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
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.


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.


Regards

You can change in Revit itself for multiple elements?
Coefficient

1 Like

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.

Is this what you need?

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.

Could you drop here sample rvt file?

Off course. WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free
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.

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.

Is this what you need?

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