save#

MapdlTheme.save(filename)#

Serialize this theme to a json file.

before_close_callback is non-serializable and is omitted.

Parameters:
filenamestr

Path to save the theme to. Should end in '.json'.

Return type:

None

Examples

Export and then load back in a theme.

>>> import pyvista as pv
>>> theme = pv.themes.DocumentTheme()
>>> theme.background = 'white'
>>> theme.save('my_theme.json')  
>>> loaded_theme = pv.load_theme('my_theme.json')