sessioninfo
Manage information about pyRevit sessions.
Attributes
mlogger = get_logger(__name__)
module-attribute
RuntimeInfo = namedtuple('RuntimeInfo', ['pyrevit_version', 'engine_version', 'host_version'])
module-attribute
Session runtime information tuple.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pyrevit_version |
str
|
formatted pyRevit version |
required |
engine_version |
int
|
active IronPython engine version |
required |
host_version |
str
|
Current Revit version |
required |
Functions
setup_runtime_vars()
Setup runtime environment variables with session information.
Source code in pyrevitlib/pyrevit/loader/sessioninfo.py
get_runtime_info()
Return runtime information tuple.
Returns:
Type | Description |
---|---|
RuntimeInfo
|
runtime info tuple |
Examples:
Source code in pyrevitlib/pyrevit/loader/sessioninfo.py
set_session_uuid(uuid_str)
Set session uuid on environment variable.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
uuid_str |
str
|
session uuid string |
required |
get_session_uuid()
Read session uuid from environment variable.
Returns:
Type | Description |
---|---|
str
|
session uuid string |
new_session_uuid()
Create a new uuid for a pyRevit session.
Returns:
Type | Description |
---|---|
str
|
session uuid string |
get_loaded_pyrevit_assemblies()
Return list of loaded pyRevit assemblies from environment variable.
Returns:
Type | Description |
---|---|
list[str]
|
list of loaded assemblies |
Source code in pyrevitlib/pyrevit/loader/sessioninfo.py
set_loaded_pyrevit_assemblies(loaded_assm_name_list)
Set the environment variable with list of loaded assemblies.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
loaded_assm_name_list |
list[str]
|
list of assembly names |
required |
Source code in pyrevitlib/pyrevit/loader/sessioninfo.py
get_loaded_pyrevit_referenced_modules()
Source code in pyrevitlib/pyrevit/loader/sessioninfo.py
set_loaded_pyrevit_referenced_modules(loaded_assm_name_list)
update_loaded_pyrevit_referenced_modules(loaded_assm_name_list)
report_env()
Report python version, home directory, config file, etc.