RVTDocs.com
Namespace: Autodesk.Revit.DB Class: Element

Element.SetEntity

Method
Description:
Stores the entity in the element. If an Entity described by the same Schema already exists, it is overwritten.
Syntax
public void SetEntity(
	Entity entity
)
Parameters
Parameter Type Description
entity Entity The Entity to be stored.
Return Value
Exceptions
Exception Condition
ArgumentException Writing of Entities of this Schema is not allowed to the current add-in.
ArgumentNullException A non-optional argument was null