Hello friends. How replace fitting in all project by dynamo?for example tee?. If not how disconnect all connection by dynamo? Thanks
check out these tools…
PyRevitMEP
# coding: utf8
from pyrevit import script, revit
from pyrevitmep.meputils import NoConnectorManagerError, get_connector_manager
__doc__ = """Disconnect all connector of an element"""
__title__ = "Disconnect"
__author__ = "Cyril Waechter"
logger = script.get_logger()
doc = revit.doc
output = script.get_output()
def disconnect_all_connectors(el):
for connector in get_connector_manager(el).Connectors:
if not connector.IsConnected:
continue
for other_connector in connector.AllRefs:
if other_connector == connector:
continue
connector.DisconnectFrom(other_connector)
system = connector.MEPSystem
if not system or not system.IsMultipleNetwork:
continue
connector.MEPSystem.DivideSystem(doc)
def disconnect():
with revit.Transaction("Disconnect elements", doc):
for el in revit.get_selection():
try:
disconnect_all_connectors(el)
except NoConnectorManagerError:
print(
"No connector manager found for {}: {}".format(
el.Category.Name, output.linkify(el.Id)
)
)
disconnect()
KR
Andreas
What’s your reason for doing this in Dynamo? If you’re replacing all fittings (of a certain type?) then just select all instances in project and then change the type. If you have too many types to manually select then you could create a schedule to group types and select that way.
Please provide more information and show what you’ve tried so far. This is not a forum for asking for solutions. You need to provide some effort towards the solution.
if you will do that then all fiiting will belong to you pipeseries…but possible
Thanks dear. Its worked for disconnect all. Thats great
Hi Nick. Its realy hard to replce for example all tees in project by another tee ( it crash,…)
Dynamo won’t fix this. You’ll need to make changes in smaller groups then.
hi Draxl , How can add this code for revit 2025?