private void AssociateLevelTo3DView(Level level, View3D view)
        {
            SchemaBuilder builder = new SchemaBuilder(Guids.THREE_D_VIEW_SHEMA_GUID);

            builder.SetReadAccessLevel(AccessLevel.Public);
            builder.SetWriteAccessLevel(AccessLevel.Public);

            builder.SetSchemaName("AssociatedLevel");

            builder.SetDocumentation("Associated level");

            // Create field1
            FieldBuilder fieldBuilder1 = builder.AddSimpleField("Level", typeof(ElementId));

            // Register the schema object
            Schema schema = builder.Finish();

            Field levelId = schema.GetField("Level");

            Entity ent = new Entity(schema);

            ent.Set(levelId, level.Id);

            view.SetEntity(ent);
        }