A connector in an Autodesk Revit MEP project document.
Inheritance Hierarchy
System.ObjectAutodesk.Revit.DB.Connector
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public class Connector : IConnector, IDisposable
The Connector type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| AllowsSlopeAdjustments | Indicates if the connector allows the slope adjustment. | |
| AllRefs | All references of the connector. | |
| Angle | The angle of the Connector. | |
| AssignedDuctFlowConfiguration | The assigned duct flow configuration of the connector. | |
| AssignedDuctLossMethod | The duct loss method of the connector. | |
| AssignedFixtureUnits | The assigned fixture units of the connector. | |
| AssignedFlow | The assigned flow of the connector. | |
| AssignedFlowDirection | The assigned flow direction of the connector. | |
| AssignedFlowFactor | The assigned flow factor of this connector. | |
| AssignedKCoefficient | The assigned kCoefficient of the connector. | |
| AssignedLossCoefficient | The assigned loss coefficient of the connector. | |
| AssignedPipeFlowConfiguration | The pipe flow configuration type of the connector. | |
| AssignedPipeLossMethod | The pipe loss method of the connector. | |
| AssignedPressureDrop | The assigned pressure drop of the connector. | |
| Coefficient | The coefficient of the connector. | |
| ConnectorManager | The connector manager of the connector. | |
| ConnectorType | The connector type of the connector. | |
| CoordinateSystem | The coordinate system of the connector. | |
| Demand | The demand of the connector. | |
| Description | The description. | |
| Direction | The direction of the connector. | |
| Domain | The domain of the connector. | |
| DuctSystemType | The duct system type of the connector. | |
| ElectricalSystemType | The electrical system type of the connector. | |
| EngagementLength | 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. | |
| Flow | The flow of the connector. | |
| GasketLength | 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. | |
| Height | The height of the connector. | |
| Id | A unique identifier to identify this connector. | |
| IsConnected | Identifies if the connector is physically connected to a connector on another element. | |
| IsMovable | whether the connector can be moved. | |
| IsValidObject | Specifies whether the .NET object represents a valid Revit entity. | |
| MEPSystem | The system of the connector belong to. | |
| Origin | The location of the connector. | |
| Owner | The host of the connector. | |
| PipeSystemType | The pipe system type of the connector. | |
| PressureDrop | The pressure drop of the connector. | |
| Radius | The radius of the connector. | |
| Shape | The shape of the connector. | |
| Utility | Indicates if the connector is a utility connector. | |
| VelocityPressure | The velocity pressure of the connector. | |
| Width | The width of the connector. |
Methods
| Name | Description | |
|---|---|---|
| ConnectTo | Make connection between two connectors. | |
| DisconnectFrom | Remove connection between two connectors. | |
| Dispose | Releases all resources used by the Connector | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| GetFabricationConnectorInfo | Gets fabrication connectivity information. | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetMEPConnectorInfo | Gets MEP connector information. | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| IsConnectedTo | Identifies if the connector is connected to the specified connector. | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
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
C#
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); } }
VB
Public Sub GetElementAtConnector(connector As Autodesk.Revit.DB.Connector) Dim mepSystem As MEPSystem = connector.MEPSystem If mepSystem IsNot Nothing Then Dim message As String = "Connector is owned by: " + connector.Owner.Name If connector.IsConnected = True Then Dim connectorSet As ConnectorSet = connector.AllRefs Dim csi As ConnectorSetIterator = connectorSet.ForwardIterator() While csi.MoveNext() Dim connected As Connector = TryCast(csi.Current, Connector) If connected IsNot Nothing Then ' look for physical connections If connected.ConnectorType = ConnectorType.[End] OrElse connected.ConnectorType = ConnectorType.Curve OrElse connected.ConnectorType = ConnectorType.Physical Then message += vbLf & "Connector is connected to: " + connected.Owner.Name message += vbLf & "Connection type is: " + connected.ConnectorType End If End If End While Else message += vbLf & "Connector is not connected to anything." End If UI.TaskDialog.Show("Revit", message) End If End Sub
