Visor#

class ansys.visor.viewer.Visor(url=None, standalone=True, dark_mode=None)#

Base class that provides an interface for initializing and managing a visualization app.

This class supports server-based rendering and interaction with a visualization pipeline.

Parameters:
rendering_engineRenderingEngine, default: RenderingEngine.VTK

Rendering engine to use for visualization.

urlstr, default: None

URL to connect to an existing server instance or to create a new one.

standalonebool, default: True

Whether to use the standalone client path or the Dash component in a Dash app.

dark_modebool, Default: None

Whether to use dark mode for the app. If None, the default dark mode setting from the configuration is used.

Methods

Visor.add_dataset(input[, metadata])

Add a dataset to the scene and return its dataset ID.

Visor.info()

Return a dictionary with information about the VISOR instance.

Visor.list_datasets()

List the available datasets in the scene.

Visor.list_variables(dataset_id)

List the variables for a dataset.

Visor.load_state(state_dir)

Load the app state from a JSON file.

Visor.remove_dataset(dataset_id)

Remove a dataset from the scene.

Visor.save_state(state_dir)

Save the app state to a JSON file.

Visor.start([input, metadata, timeout, blocking])

Start the server and app synchronously.

Visor.stop()

Stop the server.

Visor.update(input[, metadata])

Updates the model with a new input file and metadata.

Visor.update_variables(dataset_id, variables)

Update variables for a dataset.

Attributes

Visor.dark_mode

Dark mode flag of the server

Visor.host

Host of the server.

Visor.port

Port of the server.

Visor.standalone

Dash flag of the server

Visor.url

URL of the server.