extensionmgr
Find, parse and cache extensions.
There are two types of extensions: UI Extensions (components.Extension) and Library Extensions (components.LibraryExtension).
This module, finds the ui extensions installed and parses their directory for tools or loads them from cache. It also finds the library extensions and adds their directory address to the ui extensions so the python tools can use the shared libraries.
To do its job correctly, this module needs to communicate with pyrevit.userconfig to get a list of user extension folder and also pyrevit.extensions.extpackages to check whether an extension is active or not.
Attributes
mlogger = get_logger(__name__)
module-attribute
Classes
Functions
get_command_from_path(comp_path)
Returns a pyRevit command object from the given bundle directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
comp_path |
str
|
Full directory address of the command bundle |
required |
Returns:
Type | Description |
---|---|
GenericUICommand
|
A subclass of pyRevit command object. |
Source code in pyrevitlib/pyrevit/extensions/extensionmgr.py
get_thirdparty_extension_data()
Returns all installed and active UI and Library extensions (not parsed).
Returns:
Type | Description |
---|---|
list
|
list of components.Extension or components.LibraryExtension |
Source code in pyrevitlib/pyrevit/extensions/extensionmgr.py
get_installed_lib_extensions(root_dir)
Returns all the installed and active Library extensions (not parsed).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root_dir |
str
|
Extensions directory address |
required |
Returns:
Type | Description |
---|---|
list[LibraryExtension]
|
list of components.LibraryExtension objects |
Source code in pyrevitlib/pyrevit/extensions/extensionmgr.py
get_installed_ui_extensions()
Returns all UI extensions (fully parsed) under the given directory.
This will also process the Library extensions and will add their path to the syspath of the UI extensions.
Returns:
Type | Description |
---|---|
list[Extension]
|
list of components.Extension objects |