Host Property


If the instance is contained within another element, this property returns the containing element. An instance that is face hosted will return the element containing the face.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public Element Host { get; }
Visual Basic
Public ReadOnly Property Host As Element
	Get
Visual C++
public:
property Element^ Host {
	Element^ get ();
}

Remarks

An example of an instance that is contained is a window. In this case the host property would return the wall in which the window is contained. Another example is an instance that is hosted to a planar or curved face in a Mass element will return the Mass element.

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 →