IsValidTargetAttachment Method


Wall Is Valid Target Attachment Method

Says whether the element id can be used as a target for a new attachment.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public static bool IsValidTargetAttachment(
	Document doc,
	ElementId targetId
)

Parameters

doc Document
Current Revit document.
targetId ElementId
A proposed target element id for a wall attachment.

Return Value

Boolean
Returns true if the element id can be used as a target for a new attachment, false otherwise.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
Remarks
Valid targets are roofs, floors, ceilings, toposolids, or other walls.
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →