Class Fitting
- Namespace
- OpenMEPRevit.Element
- Assembly
- OpenMEPRevit.dll
This object represents a single instance of a family type, such as a single I beam.
public class Fitting
- Inheritance
-
Fitting
- Inherited Members
Remarks
Examples of FamilyInstance objects within Autodesk Revit are Beams, Columns, Braces and Desks. The FamilyInstance object provides more detailed properties that enable the type of the family instance to be changed, thus changing their appearance within the project.
Methods
ConnectorInfo(Element)
return information connector of fitting
[MultiReturn(new string[] { "Size", "PartType" })]
[NodeCategory("Query")]
public static IDictionary ConnectorInfo(Element fitting)
Parameters
fitting
Elementfamily instance
Returns
Examples
NewCrossFitting(Connector, Connector, Connector, Connector)
Add a new family instance of a cross fitting into the Autodesk Revit document, using four connectors.
[NodeCategory("Create")]
public static Element? NewCrossFitting(Connector connector1, Connector connector2, Connector connector3, Connector connector4)
Parameters
connector1
ConnectorThe first connector to be connected to the cross.
connector2
ConnectorThe second connector to be connected to the cross.
connector3
ConnectorThe third connector to be connected to the cross.
connector4
ConnectorThe fourth connector to be connected to the cross
Returns
- Element
If creation was successful then an family instance to the new object is returned, and the transition fitting will be added at the connectors' end if necessary, otherwise an exception with failure information will be thrown.
Examples
NewElbowFitting(Connector, Connector)
Add a new family instance of an elbow fitting into the Autodesk Revit document, using two connectors.
[NodeCategory("Create")]
public static Element? NewElbowFitting(Connector firstConnector, Connector secondConnector)
Parameters
firstConnector
ConnectorThe first connector to be connected to the union.
secondConnector
ConnectorThe second connector to be connected to the union.
Returns
- Element
If creation was successful then an family instance to the new object is returned, otherwise an exception with failure information will be thrown.
Examples
NewTakeoffFitting(Connector, Element)
Add a new family instance of an takeoff fitting into the Autodesk Revit document, using one connector and one MEP curve.
[NodeCategory("Create")]
public static Element? NewTakeoffFitting(Connector connector, Element mepCurve)
Parameters
connector
ConnectorThe connector to be connected to the takeoff.
mepCurve
ElementThe duct or pipe which is the trunk for the takeoff.
Returns
- Element
new takeoff
Examples
NewTeeFitting(Connector, Connector?, Connector?)
Add a new family instance of a tee fitting into the Autodesk Revit document, using three connectors.
[NodeCategory("Create")]
public static Element? NewTeeFitting(Connector connector1, Connector? connector2, Connector? connector3)
Parameters
connector1
ConnectorThe first connector to be connected to the tee
connector2
ConnectorThe second connector to be connected to the tee.
connector3
ConnectorThe third connector to be connected to the tee. This should be connected to the branch of the tee.
Returns
- Element
If creation was successful then an family instance to the new object is returned, and the transition fitting will be added at the connectors' end if necessary, otherwise an exception with failure information will be thrown
Examples
NewTransitionFitting(Connector, Connector)
Add a new family instance of an transition fitting into the Autodesk Revit document, using two connectors.
[NodeCategory("Create")]
public static Element? NewTransitionFitting(Connector connector1, Connector connector2)
Parameters
connector1
ConnectorThe first connector to be connected to the transition.
connector2
ConnectorThe second connector to be connected to the transition.
Returns
- Element
new transition
Examples
NewUnionFitting(Connector, Connector)
Add a new family instance of an union fitting into the Autodesk Revit document, using two connectors.
[NodeCategory("Create")]
public static Element? NewUnionFitting(Connector firstConnector, Connector secondConnector)
Parameters
firstConnector
ConnectorThe first connector to be connected to the union.
secondConnector
ConnectorThe second connector to be connected to the union.
Returns
- Element
If creation was successful then an family instance to the new object is returned, otherwise an exception with failure information will be thrown.
Examples
SetAngle(Element?, double)
Set Angle of tee fitting
[NodeCategory("Action")]
public static Element? SetAngle(Element? fitting, double angle)
Parameters
fitting
Elementfitting need to change angle
angle
doubleangle to set (degrees)
Returns
- Element
fitting
Examples
Remarks
this function just apply for tee have two connector
SetRadius(Element?, double)
Set radius of fitting
[NodeCategory("Action")]
public static Element? SetRadius(Element? fitting, double radius)
Parameters
fitting
Elementfitting will be set
radius
doublevalue radius
Returns
- Element
fitting