SchemaBuilderFinish Method |
Registers and returns the created Schema object.
Namespace: Autodesk.Revit.DB.ExtensibleStorageAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
SyntaxPublic Function Finish As Schema
member Finish : unit -> Schema
Return Value
Schema
The newly created Schema.
ExceptionsException | Condition |
---|
InvalidOperationException |
The SchemaBuilder has already finished building the Schema.
-or-
A different Schema with a matching identity already exists.
-or-
Two fields with the same name are detected.
-or-
At least one field has invalid units.
-or-
SchemaName is not set.
-or-
VendorId is not set for a restricted access level.
-or-
ApplicationGUID is not set for an application access level.
-or-
More than 256 fields were added to the schema.
|
Remarks
While building schema during API application startup is allowed, it has some negative performance impact on file open and save.
It is better for performance to defer schema creation till the moment it is about to be used.
See Also