Revit 2019.1 API |
Entity Constructor (Guid) |
Entity Class See Also |
Creates a new Entity corresponding to the Schema of the specified GUID.
Namespace: Autodesk.Revit.DB.ExtensibleStorage
Assembly: RevitAPI (in RevitAPI.dll) Version: 19.0.0.0 (19.1.0.0)
Since:
2012
Syntax
C# |
---|
public Entity( Guid schemaGUID ) |
Visual Basic |
---|
Public Sub New ( _ schemaGUID As Guid _ ) |
Visual C++ |
---|
public: Entity( Guid schemaGUID ) |
Parameters
- schemaGUID
- Type: System..::..Guid
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.
If the GUID does not correspond to a known Schema, the Entity will be invalid
and an exception will be thrown.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The GUID does not correspond to any Schema in memory. |
Autodesk.Revit.Exceptions..::..InvalidOperationException | Writing of Entities of this Schema is not allowed to the current add-in. |