Connector Class

A connector in an Autodesk Revit MEP project document.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBConnector

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class Connector : IConnector, IDisposable

The Connector type exposes the following members.

Properties
 NameDescription
Public propertyAllowsSlopeAdjustments Indicates if the connector allows the slope adjustment.
Public propertyAllRefsAll references of the connector.
Public propertyAngleThe angle of the Connector.
Public propertyAssignedDuctFlowConfigurationThe assigned duct flow configuration of the connector.
Public propertyAssignedDuctLossMethodThe duct loss method of the connector.
Public propertyAssignedFixtureUnitsThe assigned fixture units of the connector.
Public propertyAssignedFlowThe assigned flow of the connector.
Public propertyAssignedFlowDirectionThe assigned flow direction of the connector.
Public propertyAssignedFlowFactorThe assigned flow factor of this connector.
Public propertyAssignedKCoefficientThe assigned kCoefficient of the connector.
Public propertyAssignedLossCoefficientThe assigned loss coefficient of the connector.
Public propertyAssignedPipeFlowConfigurationThe pipe flow configuration type of the connector.
Public propertyAssignedPipeLossMethodThe pipe loss method of the connector.
Public propertyAssignedPressureDropThe assigned pressure drop of the connector.
Public propertyCoefficient The coefficient of the connector.
Public propertyConnectorManagerThe connector manager of the connector.
Public propertyConnectorTypeThe connector type of the connector.
Public propertyCoordinateSystemThe coordinate system of the connector.
Public propertyDemandThe demand of the connector.
Public propertyDescription The description.
Public propertyDirection The direction of the connector.
Public propertyDomainThe domain of the connector.
Public propertyDuctSystemTypeThe duct system type of the connector.
Public propertyElectricalSystemTypeThe electrical system type of the connector.
Public propertyEngagementLength Connector engagement length. When applicable, it represents the inset distance to the end of the fabrication part from the connection point. Otherwise it returns zero.
Public propertyFlow The flow of the connector.
Public propertyGasketLength Connector gasket length. When applicable, it represents the distance from the end of the fabrication part to the center of the gasket. Otherwise it returns zero.
Public propertyHeightThe height of the connector.
Public propertyId A unique identifier to identify this connector.
Public propertyIsConnectedIdentifies if the connector is physically connected to a connector on another element.
Public propertyIsMovablewhether the connector can be moved.
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyMEPSystemThe system of the connector belong to.
Public propertyOriginThe location of the connector.
Public propertyOwnerThe host of the connector.
Public propertyPipeSystemTypeThe pipe system type of the connector.
Public propertyPressureDrop The pressure drop of the connector.
Public propertyRadiusThe radius of the connector.
Public propertyShapeThe shape of the connector.
Public propertyUtility Indicates if the connector is a utility connector.
Public propertyVelocityPressure The velocity pressure of the connector.
Public propertyWidthThe width of the connector.
Top
Methods
 NameDescription
Public methodConnectToMake connection between two connectors.
Public methodDisconnectFromRemove connection between two connectors.
Public methodDisposeReleases all resources used by the Connector
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetFabricationConnectorInfo Gets fabrication connectivity information.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetMEPConnectorInfo Gets MEP connector information.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIsConnectedToIdentifies if the connector is connected to the specified connector.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks
This connector is an item that is a part of another element (duct, pipe, fitting, or equipment etc.). This connector does not represent the connector element that can be created inside a family; for that element, refer to ConnectorElement.
Example
public void GetElementAtConnector(Autodesk.Revit.DB.Connector connector)
{
    MEPSystem mepSystem = connector.MEPSystem;
    if (null != mepSystem)
    {
        string message = "Connector is owned by: " + connector.Owner.Name;

        if (connector.IsConnected == true)
        {
            ConnectorSet connectorSet = connector.AllRefs;
            ConnectorSetIterator csi = connectorSet.ForwardIterator();
            while (csi.MoveNext())
            {
                Connector connected = csi.Current as Connector;
                if (null != connected)
                {
                    // look for physical connections
                    if (connected.ConnectorType == ConnectorType.End ||
                        connected.ConnectorType == ConnectorType.Curve ||
                        connected.ConnectorType == ConnectorType.Physical)
                    {
                        message += "\nConnector is connected to: " + connected.Owner.Name;
                        message += "\nConnection type is: " + connected.ConnectorType;
                    }
                }
            }
        }
        else
        {
            message += "\nConnector is not connected to anything.";
        }

        Autodesk.Revit.UI.TaskDialog.Show("Revit", message);            
    }
}
See Also