genericcomps
Generic extension components.
Attributes
mlogger = coreutils.logger.get_logger(__name__)
module-attribute
EXT_DIR_KEY = 'directory'
module-attribute
SUB_CMP_KEY = 'components'
module-attribute
LAYOUT_ITEM_KEY = 'layout_items'
module-attribute
LAYOUT_DIR_KEY = 'directive'
module-attribute
TYPE_ID_KEY = 'type_id'
module-attribute
NAME_KEY = 'name'
module-attribute
Classes
TypedComponent
Bases: object
Component with a type id.
Attributes
type_id = None
class-attribute
instance-attribute
CachableComponent
Bases: TypedComponent
Cacheable Component.
Attributes
type_id = None
class-attribute
instance-attribute
Functions
get_cache_data()
LayoutDirective(directive_type=None, target=None)
Bases: CachableComponent
Layout directive.
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
Attributes
type_id = None
class-attribute
instance-attribute
directive_type = directive_type
instance-attribute
target = target
instance-attribute
Functions
get_cache_data()
LayoutItem(name=None, directive=None)
Bases: CachableComponent
Layout item.
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
Attributes
type_id = None
class-attribute
instance-attribute
name = name
instance-attribute
directive = directive
instance-attribute
Functions
get_cache_data()
GenericComponent()
Bases: CachableComponent
Generic component object.
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
Attributes
type_id = None
class-attribute
instance-attribute
name = None
instance-attribute
is_container
property
Functions
get_cache_data()
GenericUIComponent(cmp_path=None)
Bases: GenericComponent
Generic UI component.
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
Attributes
type_id = None
class-attribute
instance-attribute
name = None
instance-attribute
is_container
property
directory = cmp_path
instance-attribute
unique_name = None
instance-attribute
parent_ctrl_id = None
instance-attribute
icon_file = None
instance-attribute
author = None
instance-attribute
media_file = None
instance-attribute
min_revit_ver = None
instance-attribute
max_revit_ver = None
instance-attribute
is_beta = False
instance-attribute
highlight_type = None
instance-attribute
collapsed = False
instance-attribute
version = None
instance-attribute
meta = {}
instance-attribute
meta_file = None
instance-attribute
modules = []
instance-attribute
module_paths = []
instance-attribute
binary_path = None
instance-attribute
library_path = None
instance-attribute
control_id
property
ui_title
property
tooltip
property
help_url
property
is_supported
property
Functions
get_cache_data()
load_cache_data(cache_dict)
matches(component_path)
classmethod
make_unique_name(cmp_path)
classmethod
Creates a unique name for the command.
This is used to uniquely identify this command and also to create the class in pyRevit dll assembly. Current method create a unique name based on the command full directory address.
Examples:
for 'pyRevit.extension/pyRevit.tab/Edit.panel/Flip doors.pushbutton' unique name would be: 'pyrevit-pyrevit-edit-flipdoors'.
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
get_full_bundle_name()
has_module_path(path)
add_module_path(path)
remove_module_path(path)
get_bundle_file(file_name)
find_bundle_file(patterns, finder='postfix')
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
find_bundle_module(module, by_host=False)
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
configure(config_dict)
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
GenericUIContainer(cmp_path=None)
Bases: GenericUIComponent
Superclass for all UI group items (tab, panel, button groups, stacks).
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
Attributes
type_id = None
class-attribute
instance-attribute
name = None
instance-attribute
is_container
property
directory = cmp_path
instance-attribute
unique_name = None
instance-attribute
parent_ctrl_id = None
instance-attribute
icon_file = None
instance-attribute
author = None
instance-attribute
media_file = None
instance-attribute
min_revit_ver = None
instance-attribute
max_revit_ver = None
instance-attribute
is_beta = False
instance-attribute
highlight_type = None
instance-attribute
collapsed = False
instance-attribute
version = None
instance-attribute
meta = {}
instance-attribute
meta_file = None
instance-attribute
modules = []
instance-attribute
module_paths = []
instance-attribute
binary_path = None
instance-attribute
library_path = None
instance-attribute
control_id
property
ui_title
property
tooltip
property
help_url
property
is_supported
property
allowed_sub_cmps = []
class-attribute
instance-attribute
layout_items = []
instance-attribute
components = []
instance-attribute
Functions
get_cache_data()
load_cache_data(cache_dict)
matches(component_path)
classmethod
make_unique_name(cmp_path)
classmethod
Creates a unique name for the command.
This is used to uniquely identify this command and also to create the class in pyRevit dll assembly. Current method create a unique name based on the command full directory address.
Examples:
for 'pyRevit.extension/pyRevit.tab/Edit.panel/Flip doors.pushbutton' unique name would be: 'pyrevit-pyrevit-edit-flipdoors'.
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
get_full_bundle_name()
has_module_path(path)
get_bundle_file(file_name)
find_bundle_file(patterns, finder='postfix')
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
find_bundle_module(module, by_host=False)
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
parse_layout_directive(layout_line)
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
parse_layout_item(layout_line)
parse_layout_items(layout_lines)
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
parse_layout_metadata()
contains(item_name)
add_module_path(path)
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
remove_module_path(path)
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
add_component(comp)
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
find_components_of_type(cmp_type)
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
find_layout_items()
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
configure(config_dict)
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
GenericUICommand(cmp_path=None, needs_script=True)
Bases: GenericUIComponent
Superclass for all single commands.
The information provided by these classes will be used to create a push button under Revit UI. However, pyRevit expands the capabilities of push button beyond what is provided by Revit UI. (e.g. Toggle button changes it's icon based on its on/off status) See LinkButton and ToggleButton classes.
Source code in pyrevitlib/pyrevit/extensions/genericcomps.py
Attributes
type_id = None
class-attribute
instance-attribute
name = None
instance-attribute
is_container
property
directory = cmp_path
instance-attribute
unique_name = None
instance-attribute
parent_ctrl_id = None
instance-attribute
icon_file = None
instance-attribute
author = None
instance-attribute
media_file = None
instance-attribute
min_revit_ver = None
instance-attribute
max_revit_ver = None
instance-attribute
is_beta = False
instance-attribute
highlight_type = None
instance-attribute
collapsed = False
instance-attribute
version = None
instance-attribute
meta = {}
instance-attribute
meta_file = None
instance-attribute
modules = []
instance-attribute
module_paths = []
instance-attribute
binary_path = None
instance-attribute
library_path = None
instance-attribute
ui_title
property
tooltip
property
help_url
property
is_supported
property
needs_script = needs_script
instance-attribute
script_file = None
instance-attribute
config_script_file = None
instance-attribute
arguments = []
instance-attribute
context = None
instance-attribute
class_name = None
instance-attribute
avail_class_name = None
instance-attribute
requires_clean_engine = False
instance-attribute
requires_fullframe_engine = False
instance-attribute
requires_persistent_engine = False
instance-attribute
requires_mainthread_engine = False
instance-attribute
dynamo_path = None
instance-attribute
dynamo_path_check_existing = False
instance-attribute
dynamo_force_manual_run = False
instance-attribute
dynamo_model_nodes_info = None
instance-attribute
script_language
property
control_id
property
is_cpython
property
Functions
get_cache_data()
load_cache_data(cache_dict)
matches(component_path)
classmethod
make_unique_name(cmp_path)
classmethod
Creates a unique name for the command.
This is used to uniquely identify this command and also to create the class in pyRevit dll assembly. Current method create a unique name based on the command full directory address.
Examples:
for 'pyRevit.extension/pyRevit.tab/Edit.panel/Flip doors.pushbutton' unique name would be: 'pyrevit-pyrevit-edit-flipdoors'.