Exemplo n.º 1
0
        // clear all bim360 caches
        public static void ClearAllCaches(RevitCacheType cacheType)
        {
            var cacheDirFinder = new Regex(@"\d\d\d\d");

            foreach (RevitProduct revitProduct in RevitProduct.ListInstalledProducts())
            {
                ClearCache(revitProduct.ProductYear, cacheType);
            }
        }
Exemplo n.º 2
0
 // clear bim360 cache
 public static void ClearCache(int revitYear, RevitCacheType cacheType)
 {
     // make sure all revit instances are closed
     switch (cacheType)
     {
     case RevitCacheType.BIM360Cache:
         var cachePath = GetBIM360CacheDirectory(revitYear);
         logger.Debug("Attempting to clean {0}", cachePath);
         if (CommonUtils.VerifyPath(cachePath))
         {
             RevitController.KillRunningRevits(revitYear);
             CommonUtils.DeleteDirectory(cachePath);
         }
         break;
     }
 }