Files
speckle-sharp-connectors/Connectors/Revit/Speckle.Connectors.RevitShared/HostApp/IdStorageSchema.cs
T
2024-07-04 11:56:34 +01:00

23 lines
547 B
C#

using Autodesk.Revit.DB.ExtensibleStorage;
namespace Speckle.Connectors.Revit.HostApp;
public class IdStorageSchema : IStorageSchema
{
private readonly Guid _schemaGuid = new("D0E2AD18-0DE0-41CF-A2B7-5384267061D7");
public Schema GetSchema()
{
Schema schema = Schema.Lookup(_schemaGuid);
if (schema != null)
{
return schema;
}
using SchemaBuilder builder = new(_schemaGuid);
builder.SetSchemaName("DataStorageUniqueId");
builder.AddSimpleField("Id", typeof(Guid));
return builder.Finish();
}
}