2025.3 Method
Changes 0
M

FabricationPart.CreateHanger

Description:
Creates a hanger on the fabrication part.
Overloads (3):
CreateHanger(Document,FabricationServiceButton,Int32,ElementId,Connector,Double,Boolean)
public static FabricationPart CreateHanger(
	Document document,
	FabricationServiceButton button,
	int condition,
	ElementId hostId,
	Connector hostConnector,
	double distance,
	bool attachToStructure
)
  • document
    The document.
  • button
    The fabrication service button to use.
  • Int32
    condition
    The condition index. If the button has multiple conditions.
  • hostId
    The host part id. The host should be one horizontal straight part.
  • hostConnector
    The connector of the host.
  • Double
    distance
    The distance from the input connector of the host part. Units are in feet (ft).
  • Boolean
    attachToStructure
    Attach to the nearest structural element. The structural element might be one of Floor/Roof/Stair/Structural Framing.
Return Value FabricationPart The newly-created fabrication hanger.
  • Hangers may only be placed on straight horizontal fabrication segments and some kind of fittings. -or- Invalid fabrication service button.
  • A non-optional argument was null
  • The index condition is not larger or equal to 0 and less than ConditionCount.
  • the distance is out of range. -or- cannot find suitable fabrication part for the host. -or- cannot place hanger on the host.