Revit 2026 API
WallIs |
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: 26.0.4.0 (26.0.4.0)
Syntax
public static bool IsValidTargetAttachment( Document doc, ElementId targetId )
Public Shared Function IsValidTargetAttachment ( doc As Document, targetId As ElementId ) As Boolean
public: static bool IsValidTargetAttachment( Document^ doc, ElementId^ targetId )
static member IsValidTargetAttachment : doc : Document * targetId : ElementId -> bool
Parameters
- doc Document
- Current Revit document.
- targetId ElementId
- A proposed target element id for a wall attachment.
Return Value
BooleanReturns true if the element id can be used as a target for a new attachment, false otherwise.

Exception | Condition |
---|---|
ArgumentNullException | A non-optional argument was null |

Valid targets are roofs, floors, ceilings, toposolids, or other walls.
See Also