SetSubSchemaGUID Method


Sets the GUID of the Schema of the Entities that are intended to be stored in this field.

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

Syntax

C#
public FieldBuilder SetSubSchemaGUID(
	Guid guid
)
Visual Basic
Public Function SetSubSchemaGUID ( _
	guid As Guid _
) As FieldBuilder
Visual C++
public:
FieldBuilder^ SetSubSchemaGUID(
	Guid guid
)

Parameters

guid
Type: System Guid
The GUID of the subschema.

Return Value

The FieldBuilder object may be used to add more details to the field.

Remarks

Fields of type Entity - subentities - need to specify their Schema. The framework will prevent subentities with incorrect schemas from being stored in the entity. Additionally, the access level of the subschema will be checked against the currently executing add-in and access to restricted subentities will be prevented.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions InvalidOperationException The SchemaBuilder has already finished building the Schema. -or- The field type does not utilize SubSchemas.

See Also