Modifying a dynamo script to be used for family elements

UPDATE: I succeeded to to solve the problem of non updating.
NOW, How to modify this dynamo script to be used with all family elements?

OLD POST:
Hello, I used a dynamo script from this discussion to change the loss method settings and the value changed but the pressure drop did not!!
Any suggestions to solve this problem, keeping in mind that I am very bad at python.
Thanks

Ahmed,

If you are able to, please provide some screenshots of the following:

  • The results of your execution of the script (what did it actually do, were there warning errors, etc…)
  • The revit systems analysis that shows your system is fully and properly connected (do you have flow mismatch, does flow direction make sense)
  • The revit properties panel of a few fittings to verify that the loss method, free area, flow, etc. are all updated.

Also, Revit version + Dynamo version.
The more you can provide, the easier it will be to figure out what might be causing problems.

Thanks.

1 Like

Thanks in advance.
I am sorry but I am a new user so I can not attach many images so I well reply many times.


The first screenshot shows the fitting type as (SR3-1) and this is the default value for this type of fitting, but as we can see this is not true, this fitting should be (CR3-1) so I want to change all these fittings from SR3-1 to CR3-1 with dynamo.

The second screenshot is after the execution of the script and as we can see, the value has changed to (CR3-1) but the pressure loss -which depends on the fitting type- did not change.


The third screenshot shows the correct value of pressure drop that resulted after I changed the fitting type (manually) from (CR3-1) to another type then pressed (OK), and then changed it back to (CR3-1) -manually also-

This is the dynamo script with selection node … and I modified it with the frozen elements to get all family fittings

But, I got this error [Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 62, in
Exception: The Field belongs to a different Schema from this Entity, or this Entity is invalid.
Parameter name: field]

My dynamo version is 1.3.4.6666
My revit version is 2019.2

For system inspection
image


This is the last thing sorry for all of these replies but I am not allowed to upload many images since I am a new member.

THANKS A LOT

Apologies, I’m not well-versed in schema errors to be able to help with that (I would be googling the same things you do on that one).

As for why the fitting pressure value isn’t changing, I took a deeper look into the original thread. There is a ‘toggle’ section of the script that you do not seem to be using, my understanding is you need to toggle the Loss Method in order to have the pressure drop recalculate:

From @matteo.gobbi 's script in that thread:

Give that a try and see if it helps.

1 Like