PlaceAsTap Method


Places the part by its connector to a specific position on the straight part at the specified distance from the host part connector.

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

Syntax

C#
public static void PlaceAsTap(
	Document document,
	Connector tapPartConnector,
	Connector hostPartConnector,
	double distance,
	double axisRotation,
	double secondaryAxisRotation
)
Visual Basic
Public Shared Sub PlaceAsTap ( _
	document As Document, _
	tapPartConnector As Connector, _
	hostPartConnector As Connector, _
	distance As Double, _
	axisRotation As Double, _
	secondaryAxisRotation As Double _
)
Visual C++
public:
static void PlaceAsTap(
	Document^ document, 
	Connector^ tapPartConnector, 
	Connector^ hostPartConnector, 
	double distance, 
	double axisRotation, 
	double secondaryAxisRotation
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document.
tapPartConnector
Type: Autodesk.Revit.DBConnector
The connector of the part to place.
hostPartConnector
Type: Autodesk.Revit.DBConnector
The connector of host part.
distance
Type: SystemDouble
The distance to host part connector where to place the part.
axisRotation
Type: SystemDouble
The axis rotation in radians.
secondaryAxisRotation
Type: SystemDouble
The secondary axis rotation in radians.

Remarks

Tap cannot be placed if it is already connected.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException It is not a valid part to place as tap. -or- Tap should be placed on straight part. -or- The distance is out of range. -or- For rectangular and oval parts the axis rotation must be a multiple of PI/2. -or- Invalid tap for host's profile type. -or- The fabrication part is connected.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException tap is not connected by its primary connector.
[!:Autodesk::Revit::Exceptions::InvalidOpertationException] tap does not fit on the host.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →