pyrevit.loader.sessioninfo

Manage information about pyRevit sessions.

class pyrevit.loader.sessioninfo.RuntimeInfo(pyrevit_version, engine_version, host_version)

Session runtime information tuple.

Parameters:
  • pyrevit_version (str) – formatted pyRevit version
  • engine_version (int) – active IronPython engine version
  • host_version (str) – Current Revit version
engine_version

Alias for field number 1

host_version

Alias for field number 2

pyrevit_version

Alias for field number 0

pyrevit.loader.sessioninfo.get_loaded_pyrevit_assemblies()

Return list of loaded pyRevit assemblies from environment variable.

Returns:list of loaded assemblies
Return type:list[str]
pyrevit.loader.sessioninfo.get_runtime_info()

Return runtime information tuple.

Returns:runtime info tuple
Return type:RuntimeInfo

Example

>>> sessioninfo.get_runtime_info()
pyrevit.loader.sessioninfo.get_session_uuid()

Read session uuid from environment variable.

Returns:session uuid string
Return type:str
pyrevit.loader.sessioninfo.new_session_uuid()

Create a new uuid for a pyRevit session.

Returns:session uuid string
Return type:str
pyrevit.loader.sessioninfo.report_env()

Report python version, home directory, config file, etc.

pyrevit.loader.sessioninfo.set_loaded_pyrevit_assemblies(loaded_assm_name_list)

Set the environment variable with list of loaded assemblies.

Parameters:
  • loaded_assm_name_list (list[str]) – list of assembly names
  • val (type) – desc
pyrevit.loader.sessioninfo.set_session_uuid(uuid_str)

Set session uuid on environment variable.

Parameters:uuid_str (str) – session uuid string
pyrevit.loader.sessioninfo.setup_runtime_vars()

Setup runtime environment variables with session information.