Example #1
0
        // return a list of installed extensions found under registered search paths
        // @handled @logs
        public static List <PyRevitExtension> GetInstalledExtensions(string searchPath = null)
        {
            List <string> searchPaths;

            if (searchPath is null)
            {
                searchPaths = GetRegisteredExtensionSearchPaths();
            }
            else
            {
                searchPaths = new List <string>()
                {
                    searchPath
                }
            };

            var installedExtensions = new List <PyRevitExtension>();

            foreach (var path in searchPaths)
            {
                installedExtensions.AddRange(PyRevitExtension.FindExtensions(path));
            }

            return(installedExtensions);
        }
Example #2
0
 // get list of builtin extensions
 // @handled @logs
 public static List <PyRevitExtension> GetExtensions(string clonePath)
 {
     VerifyCloneValidity(clonePath);
     return(PyRevitExtension.FindExtensions(PyRevitClone.GetExtensionsPath(clonePath)));
 }