Exemplo n.º 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(PyRevitExtensions.FindExtensions(path));
            }

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