Books#
- class mhi.enerplot.Book(*, _ctx: Context | None = None, _ident: Dict[str, Any] | None = None)#
An Enerplot Book holds one or more sheets, which in turn will hold graph frames for viewing curve data.
Left footer
Centre footer
Right footer
- reload() None#
Reload this book
The book is reloaded into the Enerplot workspace.
Warning
Any changes made to the book, which have not explicitly been saved, will be lost. Call
save()orsave_as()before reloading to preserve changes.Added in version 2.3.
- property dirty: bool#
Has the book been modified since it was last saved (read-only)
Added in version 2.3.
- is_dirty() bool#
Check if the project contains unsaved changes
- Returns:
True, if unsaved changes exist, False otherwise.
Added in version 2.3.
- save_as(path: str | PurePath, folder: str | PurePath | None = None) None#
Save book to a new path location
- Parameters:
path – location to store the book. The extension .epbx is appended if not present.
folder – If provided, the path to the book is resolved relative to this folder.
- sheets() IndexableDict[str, Sheet]#
List all of the sheets in this book.
- Returns:
an indexable dictionary of sheets.
- sheet(name: str) Sheet | None#
Retrieve a sheet reference, by name
- Parameters:
name – the name of the sheet
- Returns:
the named sheet (if present)
- new_sheet(name: str = '', description: str = '') Sheet#
Create a new sheet
- Parameters:
name – The desired sheet name; if not provided, “Sheet#” will be used.
description – a description to be given to the sheet.
- Returns:
the created sheet.