private void GetAllModel() { foreach (Part pt in Session.GetSession().Parts) { string name = pt.Name; if (ParentAssmblieInfo.IsParent(pt)) { ParentAssmblieInfo parent = ParentAssmblieInfo.GetAttribute(pt); switch (parent.Type) { case PartType.ASM: Asm.Add(new ASMModel(pt)); break; case PartType.EDM: Edm.Add(new EDMModel(pt)); break; case PartType.Electrode: ElectrodeModel eleModel = new ElectrodeModel(pt); Electrode.Add(eleModel); break; case PartType.Work: Work.Add(new WorkModel(pt)); break; default: Other.Add(pt); break; } } else { Other.Add(pt); } } }