public void DS_StartForms(UIApplication uiapp)
        {
            DS_Form newForm = new DS_Form
            {
                TopLevel = true
            };

            SourcePath = newForm.DS_OpenInputFolderDialogForm("Set folder for checking '*.rvt' files").ToString();
            if (SourcePath == "")
            {
                newForm.Close();
                return;
            }

            DestinationPath = newForm.DS_OpenOutputFolderDialogForm("Set output folder for '*.nwc' files").ToString();
            if (DestinationPath == "")
            {
                newForm.Close();
                return;
            }

            DS_Filter filter = new DS_Filter(uiapp)
            {
                TopLevel        = true,
                sourcePath      = SourcePath,
                destinationPath = DestinationPath
            };

            filter.Show();
        }
Example #2
0
        public void AddParametersToProject()
        {
            FilesPathes.Clear();
            SelectesParameters.Clear();

            bool    FileError = false;
            DS_Form newForm   = new DS_Form
            {
                TopLevel = true
            };

            FileWithProjectsPathes = newForm.DS_OpenFileDialogForm_txt("", "Select file with pathes to *.rvt projects.").ToString();
            if (FileWithProjectsPathes == "")
            {
                newForm.Close();
                return;
            }
            CreateFilesPathesList(ref FileError);

            if (FileError == true)
            {
                return;
            }

            SPFPath = newForm.DS_OpenFileDialogForm_txt("", "Select shared parameter file for loading.").ToString();
            if (SPFPath == "")
            {
                newForm.Close();
                return;
            }

            MyApplication.thisApp.ShowForm(App);
        }
Example #3
0
        public void DS_StartForms(UIApplication uiapp)
        {
            DS_Form newForm = new DS_Form
            {
                TopLevel = true
            };

            SPFPath = newForm.DS_OpenFileDialogForm_txt("", "Select shared parameter file for loading.").ToString();
            if (SPFPath == "")
            {
                newForm.Close();
                return;
            }

            ParametersNamesPath = newForm.DS_OpenFileDialogForm_txt("", "Select file with parameters names.").ToString();
            if (ParametersNamesPath == "")
            {
                newForm.Close();
                return;
            }

            AddParametersToSFPOptions addParametersToSFPOptions = new AddParametersToSFPOptions(uiapp);

            addParametersToSFPOptions.Show();
        }
        public void AssignFamilyPath()
        {
            DS_Form newForm = new DS_Form
            {
                TopLevel = true
            };

            FamilyPath = newForm.DS_OpenInputFolderDialogForm().ToString();
            if (FamilyPath == "")
            {
                newForm.Close();
                return;
            }
        }
        public void Program()
        {
            //New form creation
            DS_Form newForm = new DS_Form();

            string FolderPathNWD = newForm.DS_OpenFolderDialogForm("", "Set directory for projects with NWF files:").ToString();

            if (FolderPathNWD == "")
            {
                newForm.Close();
                return;
            }
            SourseFolderPath = FolderPathNWD;
            string CurDateTime = DateTime.Now.ToString("yyMMdd_HHmmss");

            DS_Output dS_Output = new DS_Output
            {
                DS_WritePath = SourseFolderPath + "\\" + "Log_ClashVPReport_" + CurDateTime + ".txt"
            };

            SavedFiles.Clear();
            SavedFiles.Add("Files has been saved: " + "\n");
            FilesWithNoClashTests.Clear();
            FilesWithNoClashTests.Add("No clash tests exist in files: " + "\n");
            FilesWithNoClashRes.Clear();
            FilesWithNoClashRes.Add("No clashes are in files: " + "\n");

            FilesCheck(SourseFolderPath);

            DirIterate(SourseFolderPath);


            //Start log writing
            if (SavedFiles.Count > 1)
            {
                SavedFiles.Add("\n");
                foreach (string s in SavedFiles)
                {
                    dS_Output.DS_StreamWriter(s);
                }
            }
            else
            {
                dS_Output.DS_StreamWriter("No NWF files have been found in this folder.");
                MessageBox.Show("Errors occurred!" + "\n" + "Look at " + dS_Output.DS_WritePath + " for details.");
                return;
            }

            if (FilesWithNoClashTests.Count > 1)
            {
                FilesWithNoClashTests.Add("\n");
                foreach (string s in FilesWithNoClashTests)
                {
                    dS_Output.DS_StreamWriter(s);
                }
            }

            if (FilesWithNoClashRes.Count > 1)
            {
                FilesWithNoClashRes.Add("\n");
                foreach (string s in FilesWithNoClashRes)
                {
                    dS_Output.DS_StreamWriter(s);
                }
            }

            MessageBox.Show("Process complete! See report: " + "\n" + dS_Output.DS_WritePath);
        }