resolve_graphics_backend#

ansys.mapdl.core.cli.convert.resolve_graphics_backend(graphics_backend)#

Coerce a graphics backend name to a GraphicsBackend member.

Parameters:
graphics_backendstr or GraphicsBackend, optional

Backend name, which is case insensitive, or an already resolved member. When None, no backend is requested.

Returns:
GraphicsBackend or None

The resolved backend, or None when graphics_backend is None.

Raises:
ValueError

When graphics_backend does not name a valid graphics backend.

Return type:

Optional[GraphicsBackend]

Examples

>>> from ansys.mapdl.core.cli.convert import resolve_graphics_backend
>>> resolve_graphics_backend("pyvista")
<GraphicsBackend.PYVISTA: 0>