Viewport#

class ansys.result_explorer.core.Viewport(pb_obj: PBType, client: Client)#

Represents a viewport in a workspace.

Methods

Viewport.hide()

Hide this viewport (make it not visible in the UI).

Viewport.save_snapshot(file_path[, settings])

Take a snapshot of this viewport and save it to PNG.

Viewport.set_size(size)

Set the size of this viewport in the workspace layout.

Viewport.set_view(...)

Assign a view to this viewport.

Viewport.show()

Show this viewport if it was previously hidden.

Viewport.take_snapshot([settings])

Take a snapshot of this viewport.

Viewport.update_display_options()

Batch display options updates in a single server call.

Attributes

Viewport.display_options

Read/write viewport display options.

Viewport.hidden

Whether this viewport is currently hidden (not visible in the UI).

Viewport.id

Unique identifier.

Viewport.metadata

Read-only viewport metadata (server-computed state).

Viewport.ready

Whether the viewport is ready.

Viewport.size

Size of the viewport as a percentage of its parent.

Viewport.solution_id

ID of the solution assigned to this viewport.

Viewport.view

Get the assigned view, if any.

Viewport.view_id

ID of the view assigned to this viewport.