Ejemplo n.º 1
0
        public _Assembly(TSM.Assembly assembly)
        {
            _assembly = assembly;
            _objClass = (assembly.GetMainPart() as TSM.Part).Class;

            TSM.Part mainPart = assembly.GetMainPart() as TSM.Part;
            _topInFrom = getTopInForm(mainPart);
        }
Ejemplo n.º 2
0
        private void selectAll()
        {
            string           statusString      = TopInFormEnum.ALL.ToString();
            TopInFormEnum    status            = (TopInFormEnum)Enum.Parse(typeof(TopInFormEnum), statusString);
            List <_Assembly> filteredAssemblys = DataSorting.filterAssemblysByTIF(_data, status);

            TeklaHandler.selectAssemblys(filteredAssemblys);
        }
Ejemplo n.º 3
0
        private void swap()
        {
            string           statusString      = cb_swapFrom.SelectedValue.ToString();
            TopInFormEnum    status            = (TopInFormEnum)Enum.Parse(typeof(TopInFormEnum), statusString);
            List <_Assembly> filteredAssemblys = DataSorting.filterAssemblysByTIF(_data, status);

            SwapMainLoop.main(filteredAssemblys);
        }
Ejemplo n.º 4
0
        private TopInFormEnum getTopInForm(TSM.Part part)
        {
            int topInForm = 6;

            part.GetUserProperty("FixedMainView", ref topInForm);
            TopInFormEnum value = (TopInFormEnum)topInForm;

            return(value);
        }
Ejemplo n.º 5
0
        private void select()
        {
            string           statusString      = cb_selectFrom.SelectedValue.ToString();
            TopInFormEnum    status            = (TopInFormEnum)Enum.Parse(typeof(TopInFormEnum), statusString);
            List <_Assembly> filteredAssemblys = DataSorting.filterAssemblysByTIF(_data, status);
            string           report            = "Selected " + filteredAssemblys.Count.ToString() + " assemblys \n";

            TeklaHandler.selectAssemblys(filteredAssemblys);
            print(report);
        }
Ejemplo n.º 6
0
        public static List <_Assembly> filterAssemblysByTIF(List <_Assembly> data, TopInFormEnum type)
        {
            List <_Assembly> selection = new List <_Assembly>();

            if (type == TopInFormEnum.ALL)
            {
                selection = data;
            }
            else
            {
                selection = data.Where(y => y._topInFrom == type).ToList();
            }

            return(selection);
        }