static SCHEMATA GetSchemata(FormatSPF file) { foreach (SEntity entity in file.Instances.Values) { if (entity is SCHEMATA) { return (SCHEMATA)entity; } } return null; }