private void TemplatCreateInfinityCase(MainElement mainElement, List <int> siteIds, int instances) { if (mainElement.Repeated != 0) { throw new Exception("InfinityCase are always Repeated = 0"); } try { int templatId = TemplateCreate(mainElement); mainElement = core.TemplateRead(templatId); foreach (int siteId in siteIds) { for (int i = 0; i < instances; i++) { List <int> siteShortList = new List <int>(); siteShortList.Add(siteId); core.CaseCreate(mainElement, "", siteShortList, ""); } } } catch (Exception ex) { EventMessage(ex.ToString(), EventArgs.Empty); //DOSOMETHING: Handle the expection throw new NotImplementedException(); } }