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…
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!
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?
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
import clr
clr.AddReference(“RevitAPI”)
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.ExternalService import *
from Autodesk.Revit.DB.ExtensibleStorage import *
from System.Collections.Generic import*
clr.AddReference(“ProtoGeometry”)
from Autodesk.DesignScript.Geometry import *
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
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
lc=[]
def getLossMethods(serviceID):
service = ExternalServiceRegistry.GetService(serviceID)
serviceIDs = service.GetRegisteredServerIDs()
list=ListElementId
for serverId in serverIds:
server = getServerByID(serverID, serviceId) #ductServer = server.IDuctFittingAndAccessoryPressureDropServer
TransactionManager.Instance.EnsureInTransaction(doc)
entity.Set[field.ValueType](field, SetNew) # installation of a new coefficient value of certain
fitting.SetEntity(entity)
TransactionManager.Instance.TransactionTaskDone()
elem.append(fitting)
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:
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…
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?
Thanks
@GregX
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.