MEP - How to set dialog box values

Hi Everyone,

Thanks to previous help I was able to setup a little script to eliminate a Warning givin by Revit for MEP Duct fittings by changing the the Loss Method to “Specific Loss”.


Now I’d like to change the default value of the “Specific Loss” to something other than 0. I’ve looked for ways of inputing this value in but can’t seem to be able to write my value in???

“Loss Method Settings” is a parameter of the fitting but I can’t write anything to it… How can I get to the right dialog box? Because this will also apply to other parameters that have dialog boxes…








































Hi Jonathan,

If your looking to set “Loss Method Settings” you need to get built in Parameter name that is “RBS_DUCT_FITTING_LOSS_METHOD_SERVER_PARAM” from Revit Lookup Table and then use Python script to Set your values. See below workflow. Good Luck!


Hello Kulkul! Thank you for the answer! I have also been troubled by this problem. Could you please repost the Python script? It is a little hard for me to tell the letters from the picture in your answer QQ Many thanks again!


Hi Kulkul,

I just got back from the holidays! Thanks for the reply. I’m just starting with Dynamo and if I understand correctly there is no other way to do this without using a Python script? I’ll rewrite what you did without rely knowing what I’m doing…

Would you say I’d have to use Python scripts to modify every dialog box in Revit since we can’t do it with Dynamo nodes?


And how did you get the “Snoop parameter” and “Enum mappings” windows???

You need to download “Revit Lookup Table” here is the download link for 2016

Just extract the contents of the zip file into your Revit 2016 addins folder (C:\ProgramData\Autodesk\Revit\Addins\2016</span> )

and for 2015 is here

Extract the 2 files to<i style=“color: #000000;”>C:\ProgramData\Autodesk\Revit\Addins\2015&lt;/i>

Good Luck!!!

So I retyped the script and it’s giving me and error that I can’t seem to fix… I opened a blank project, modeled a couple of duct with elbow and ran the script. I eliminated the errors with the first script but didn’t write the value 10 with the second script because of an error in my Python Script attempt :wink:

Here’s my Python Script corrected with mistakes I made. But it still bugs at line 43 for some reason…


import clr
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.ExternalService import *
from Autodesk.Revit.DB.ExtensibleStorage import *
from System.Collections.Generic import*

from Autodesk.DesignScript.Geometry import *

import Revit


import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *

doc = DocumentManager.Instance.CurrentDBDocument

def getServerByID(serverGUID, serviceId):
service = ExternalServiceRegistry.GetService(serviceID)
if service != “null” and serverGUID != “null”:
server = service.GetServer(serverGUID)
if server != “null”:
return server
return null
def getLossMethods(serviceID):
service = ExternalServiceRegistry.GetService(serviceID)
serviceIDs = service.GetRegisteredServerIDs()
for serverId in serverIds:
server = getServerByID(serverID, serviceId)
#ductServer = server.IDuctFittingAndAccessoryPressureDropServer


return lc
SetNew = IN[1]
for el in elems:
eleId = el.Id
fitting = doc.GetElement(eleId)
param = fitting.get_Parameter(BuiltInParameter.RBS_DUCT.FITTING_LOSS_METHOD_SERVER_PARAM)
lc = getLossMethods(ExternalServices.BuiltInExternalServices.DuctFittingAndAccessoryPressureDropServices)
schema = lc[8].GetDataSchema()
field = schema.GetField(“Coefficient”)

oldval = entity.Getfield.ValueType # obtaining values

entity.Set[field.ValueType](field, SetNew) # installation of a new coefficient value of certain
OUT = elem

Kulkul: Thanks for the Lookup Table install instructions. Can I modify this value without Python? I found the Builtin parameter node Sylvester was talking about but I can’t seem to modify the value I’m looking for… see dyn file in previous reply to see different “attempts”. Looking around the lookup tables:

Here is the dyn file Change - Coeff. - loss - fitting - duct

1 Like

Tried it and it works great! Thank you for your precious time!

Now my question is can this be done without Python? Because I’d like to do this myself and know nothing about python language. I’m just getting started with Dynamo…

I don’t think we can do this without “Python”. If your interested learning Python check out this website

Good Luck!

Well, thanks for your help on this problem. It’s very appreciated!

Hi All

Yes, there are a number of Revit parameters that are pretty complicated or atypical. MEP in particular has some specialized interactions, so I’m not too surprised by needing to make special scripts to address parameter inputs. Some of these situations may have been addressed by packages that others have shared, community contributions have grown faster than I can keep up with though, so would not be surprised if some packages have been posted that address this need. As you can see, trying to describe the problem is a challenge in itself, which makes searching for answers difficult. The challenge with dialog box parameters is that they are, almost by definition, complicated because they have identified that their data inputs are more developed than a simple number, integer, Boolean, string value, or Revit object type.



Hey everybody, excuse me if I bring this thread back to life after two years.
I tried the linked dyn both in revit 2016 and 2018 but had the same result: the Loss Method and Loss Method Settings would change, but the calculated value Pressure Drop would not.
i.e. If I input the value by hand the calculated value updates, but with python it does not. Should there be some kind of “update calculated value” code? something like "hey revit I changed the Loss Method Settings so you should recalculate the Pressure Drop value?"or is it not working with Dynamo 1.3?

It is recommended that you start a new tread and link this conversation in it. It simplifies follow-ups, kudos and solutions. I haven’t been able to dive into Python to help.

1 Like