Example #1
0
 private void GetModelInfo()
 {
     try
     {
         foreach (Document doc in m_app.Application.Documents)
         {
             if (!string.IsNullOrEmpty(doc.Title) && !doc.IsFamilyDocument)
             {
                 ModelInfo modelInfo = new ModelInfo(doc);
                 if (!modelInfoDictionary.ContainsKey(modelInfo.RevitDocumentID))
                 {
                     modelInfo.GoogleSheetID = GoogleDriveUtil.GetGoogleSheetId(modelInfo);
                     if (!string.IsNullOrEmpty(modelInfo.GoogleSheetID))
                     {
                         verifiedUser = true;
                         modelInfo.LinkInfoCollection = GoogleSheetUtil.GetLinkInfo(modelInfo.GoogleSheetID);
                     }
                     modelInfo.ViewDictionary = GetDraftingViewInfo(doc);
                     modelInfoDictionary.Add(modelInfo.RevitDocumentID, modelInfo);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Failed to get the model information.\n" + ex.Message, "Get Model Information", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
Example #2
0
 public AnexoRepositorio(EfDataContext efContext)
 {
     _googleDriveUtil = new GoogleDriveUtil();
     _efContext       = efContext;
 }