private void OnCLEMInitialiseResource(object sender, EventArgs e) { Details = this.FindAllChildren <RuminantTypeCohort>().FirstOrDefault(); ruminantType = Resources.GetResourceItem(this.Parent as Model, RuminantTypeName, OnMissingResourceActionTypes.ReportErrorAndStop, OnMissingResourceActionTypes.ReportErrorAndStop) as RuminantType; // create example ruminant Details.Number = 1; ExampleIndividual = Details.CreateIndividuals(null, BreedParams).FirstOrDefault(); }