Entity Constructor (Schema)


Creates a new Entity corresponding to the Schema.

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

Syntax

C#
public Entity(
	Schema schema
)
Visual Basic
Public Sub New ( _
	schema As Schema _
)
Visual C++
public:
Entity(
	Schema^ schema
)

Remarks

You can store the newly created Entity in an Element or in another Entity. If you do not have write access to the Schema, an exception will be thrown.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions InvalidOperationException Writing of Entities of this Schema is not allowed to the current add-in.

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 →