Fabrication part connector value

Is there any way to access the connector value of a MEP fabrication duct through API ?

Hello @shibujoseukken

here a small example

import clr
import sys
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

elem = UnwrapElement(IN[0])
conIndex = []
conValue = []

conf = FabricationConfiguration.GetFabricationConfiguration(doc)
connectors = elem.ConnectorManager.Connectors

for c in connectors:
	if c.ConnectorType == ConnectorType.End:
		connectInfo = c.GetFabricationConnectorInfo()
		cn = conf.GetFabricationConnectorName(connectInfo.BodyConnectorId)
		conValue.append(cn)
		conIndex.append("C" + str(connectInfo.FabricationIndex + 1))
		
OUT = conIndex, conValue
2 Likes

Hi @c.poupin ,
thanks for your solution, is there a way to set new connector type from drop down menu by dynamo?
I got all the connector available in project, and I am trying to select element and change their connector type by dynamo.
I appreciate if you share your ideas.

to have already tried it seems to me that currently this is not possible via the API

@amirjalaliafshar avoid asking same questions multiple times. You have already asked this here:

1 Like