public static void main(List <_Assembly> wrongAssemblys) { foreach (_Assembly currentAssembly in wrongAssemblys) { ArrayList parts = new ArrayList(); parts = currentAssembly._assembly.GetSecondaries(); TSM.Part mainPart = currentAssembly._assembly.GetMainPart() as TSM.Part; parts.Add(mainPart); foreach (TSM.Part currentPart in parts) { SwapHandler.main(currentPart); } } new TSM.Model().CommitChanges(); }
private static void swapHandlesChooser(TSM.Part part) { if (part is TSM.Beam) { TSM.Beam beam = part as TSM.Beam; SwapHandler.swapBeam(beam); } else if (part is TSM.PolyBeam) { TSM.PolyBeam polybeam = part as TSM.PolyBeam; SwapHandler.swapContour(polybeam); } else if (part is TSM.ContourPlate) { TSM.ContourPlate plate = part as TSM.ContourPlate; SwapHandler.swapContour(plate); } part.Modify(); }