PlaceOnHost Method (ElementId, Connector, Double, Double)


Places the part on the specified host.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2018

Syntax

C#
public void PlaceOnHost(
	ElementId hostId,
	Connector hostConnector,
	double distance,
	double axisRotation
)
Visual Basic
Public Sub PlaceOnHost ( _
	hostId As ElementId, _
	hostConnector As Connector, _
	distance As Double, _
	axisRotation As Double _
)
Visual C++
public:
void PlaceOnHost(
	ElementId^ hostId, 
	Connector^ hostConnector, 
	double distance, 
	double axisRotation
)

Parameters

hostId
Type: Autodesk.Revit.DBElementId
Identifier of the host fabrication part.
hostConnector
Type: Autodesk.Revit.DBConnector
The connector of the host.
distance
Type: SystemDouble
The distance from the connector to place the hosted part. Units are in feet (ft).
axisRotation
Type: SystemDouble
The axis rotation in radians.

Remarks

The document must be regenerated before the fabrication part can be used. Check ValidationStatus after regeneration to see if the part is valid for fabrication.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException Invalid fabrication part host. The host should be a straight fabrication part. -or- Invalid connector of fabrication part host. -or- The distance is out of range. -or- For rectangular and oval parts the axis rotation must be a multiple of PI/2.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also