Ejemplo n.º 1
0
        private void Button_Projects_Click(object sender, RoutedEventArgs e)
        {
            DialogForms dialogForms = new DialogForms();

            dialogForms.AssignSourcePath();

            if (DialogForms.SourcePath == "")
            {
                return;
            }


            Docs docs = new Docs(App);

            string ext = "rvt";

            docs.GetFiles(DialogForms.SourcePath, ext);
            docs.DirIterate(DialogForms.SourcePath, ext);
            FileList = docs.FileFullNames_Filtered;

            if (FileList.Count == 0)
            {
                System.Windows.MessageBox.Show("No files found!");
                return;
            }

            ProjectFilesList = new ProjectFilesList(FileList);
            ProjectFilesList.Show();
        }
Ejemplo n.º 2
0
        private void Button_Families_Click(object sender, RoutedEventArgs e)
        {
            DialogForms dialogForms = new DialogForms();

            dialogForms.AssignFamilyPath();

            if (DialogForms.FamilyPath == "")
            {
                return;
            }

            Docs docs = new Docs(App);

            string ext = "rfa";

            docs.GetFamilies(DialogForms.FamilyPath, ext);
            docs.DirFamiliesIterate(DialogForms.FamilyPath, ext);
            FamiliesList = docs.FileFullNames_Filtered;

            if (FamiliesList.Count == 0)
            {
                System.Windows.MessageBox.Show("No families found!");
                return;
            }

            FamiliesFilesList = new FamiliesFilesList(FamiliesList);
            FamiliesFilesList.Show();
        }
Ejemplo n.º 3
0
        public void ExecuteLoadProcess(List <string> files, List <string> families)
        {
            Docs docs = new Docs(App);
            int  i    = 0;

            //Through each file iterating
            foreach (string file in files)
            {
                i++;
                docs.OpenDoc(file, out Document doc);

                //Logs write
                LoadReport.Add(i + ". File path: " + doc.PathName + "\n");

                TransactionCommit(doc, families);
            }


            DS_Tools dS_Tools = new DS_Tools
            {
                DS_LogName       = CurDateTime + "_Log.txt",
                DS_LogOutputPath = DialogForms.SourcePath + "\\" + "Log" + "\\"
            };

            WriteLogToFile(dS_Tools);

            TaskDialog.Show("Revit", "Process completed successfully!");

            MyApplication.thisApp.m_MyForm.Close();
        }