ViewOperations
Provides operations for application views, scene orientation, camera, layout, rendering representation, and visualization settings. This class exposes the functionality available through the View ribbon tab, including layout presets, scene orientations, 3D/2D view operations, surface representation modes, shading options, and object widget visibility.
Import
import ScriptingApi as api
# Access via Application
app = api.Application()
ops = app.get_view_operations()
Methods
Properties
set_layout
Sets the workspace layout to a predefined arrangement of 3D and 2D slice views.
Signature:
set_layout(preset: LayoutPreset) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
preset | any | The layout preset to apply. Use api.LayoutPreset values (e.g., api.LayoutPreset.Conventional, api.LayoutPreset.ThreeDOnly, api.LayoutPreset.FourUpRight). |
get_layout
Returns the current workspace layout preset.
Signature:
get_layout() -> LayoutPreset
Returns: LayoutPreset — The active layout preset value as api.LayoutPreset.
set_scene_orientation
Sets the scene orientation type, which determines the axis labels and view directions for both 3D and 2D slice views. Standard and Classic orientations use engineering conventions (X, Y, Z). Medical orientations use anatomical camera conventions (Radiologist/Neurologist viewpoints).
Signature:
set_scene_orientation(orientation: SceneOrientation) -> None
Parameters:
| Parameter | Type | Description |
|---|---|---|
orientation | any | The scene orientation to apply. Use api.SceneOrientation values (e.g., api.SceneOrientation.Standard, api.SceneOrientation.Medical1). |
get_scene_orientation
Returns the current scene orientation type.
Signature:
get_scene_orientation() -> SceneOrientation
Returns: SceneOrientation — The active scene orientation value as api.SceneOrientation.