Visualization Controller
On-screen presentation and viewing state.
Controls how the model is displayed without altering the underlying data: visibility and activation of elements, view modes and camera orientation, color overrides, and the saving/restoring of viewing states. Strictly visual — nothing in this module changes element properties or geometry persistently.
clear_errors() -> None
Clears all errors.
display_bitmaps_as_texture_representation_in_shaded1(flag: bool) -> None
Set the graphic option to display bitmaps as textures in shaded 1.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flag
|
bool
|
True to display bitmaps as textures in shaded 1, false otherwise. |
required |
display_bitmaps_as_texture_representation_in_shaded2(flag: bool) -> None
Set the graphic option to display bitmaps as textures in shaded 2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flag
|
bool
|
True to display bitmaps as textures in shaded 2, false otherwise. |
required |
enter_working_plane(plane_normal: point_3d, plane_origin: point_3d) -> None
get_camera_data() -> camera_data
get_color(element_id: ElementId) -> int
Gets the element color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id
|
ElementId
|
The element id. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The color ID of the element. |
get_element_transparency(element_id: ElementId) -> int
Gets the element transparency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id
|
ElementId
|
The element id. |
required |
Returns:
| Type | Description |
|---|---|
int
|
Transparency value as percentage. |
get_material(element_id: ElementId) -> MaterialId
Gets the element material.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id
|
ElementId
|
The element id. |
required |
Returns:
| Type | Description |
|---|---|
MaterialId
|
The material id. |
get_opengl_color(element_id: ElementId) -> rgb_color
Gets the element OpenGL color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id
|
ElementId
|
The element id. |
required |
Returns:
| Type | Description |
|---|---|
rgb_color
|
The OpenGL color of the element. |
get_rgb_from_cadwork_color_id(color_id: ColorId) -> rgb_color
Gets the RGB color from a Cadwork color ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
color_id
|
ColorId
|
The Cadwork color ID. |
required |
Returns:
| Type | Description |
|---|---|
rgb_color
|
The RGB color corresponding to the Cadwork color ID. |
get_use_material_texture(element_id: ElementId) -> bool
Check if element is using material texture.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id
|
ElementId
|
The element id. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the element is using material texture, false otherwise. |
hide_all_elements() -> None
Hides all elements.
is_active(element_id: ElementId) -> bool
Tests if element is active.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id
|
ElementId
|
The element id. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the element is active, false otherwise. |
is_cadwork_window_in_dark_mode() -> bool
Check if Cadwork window is in dark mode.
Returns:
| Type | Description |
|---|---|
bool
|
True if the window is in dark mode, false otherwise. |
is_cadwork_window_in_light_mode() -> bool
Check if Cadwork window is in light mode.
Returns:
| Type | Description |
|---|---|
bool
|
True if the window is in light mode, false otherwise. |
is_immutable(element_id: ElementId) -> bool
Tests if the element is immutable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id
|
ElementId
|
The element id. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the element is immutable, false otherwise. |
is_plane_2d() -> bool
returns if plane 2d is active.
Returns:
| Type | Description |
|---|---|
bool
|
True if plane 2D is active, false otherwise. |
is_selectable(element_id: ElementId) -> bool
Returns if the element is selectable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id
|
ElementId
|
The element id. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the element is selectable, false otherwise. |
is_texture_rotated(element_id: ElementId) -> bool
Checks if the texture of an element is rotated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id
|
ElementId
|
The element id. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the texture is rotated, false otherwise. |
is_visible(element_id: ElementId) -> bool
Tests if element is visible.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id
|
ElementId
|
The element id. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the element is visible, false otherwise. |
load_marking_settings(settings_file_path: str) -> None
Loads marking settings file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings_file_path
|
str
|
The path to the settings file. |
required |
refresh() -> None
Refresh the drawing area.
restore_activation_state(state: None) -> None
Restores the activation state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
None
|
The activation state to restore. |
required |
restore_visibility_state(state: None) -> None
Restores the visibility state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
None
|
The visibility state to restore. |
required |
save_activation_state() -> activation_state
Saves the activation state.
Returns:
| Type | Description |
|---|---|
activation_state
|
The activation state. |
save_visibility_state() -> visibility_state
Saves the visibility state.
Returns:
| Type | Description |
|---|---|
visibility_state
|
The visibility state. |
set_active(element_id_list: list[ElementId]) -> None
Sets element active.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
set_camera(position: point_3d, target: point_3d) -> None
set_camera_data(camera_data: camera_data) -> None
Set the camera data - this will override the current camera data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
camera_data
|
camera_data
|
The camera data to set. |
required |
set_color(element_id_list: list[ElementId], color_id: ColorId) -> None
Sets the element color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
color_id
|
ColorId
|
The color ID to set. |
required |
set_color_without_material(element_id_list: list[ElementId], color_id: ColorId) -> None
Sets the color of a list of elements without changing their material.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
A list of element id. |
required |
color_id
|
ColorId
|
The color ID to set. |
required |
set_element_transparency(element_id_list: list[ElementId], value: int) -> None
Sets the element transparency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The element id list. |
required |
value
|
int
|
Transparency value as percentage. |
required |
set_immutable(element_id_list: list[ElementId]) -> None
Sets the element immutable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
set_inactive(element_id_list: list[ElementId]) -> None
Sets the element inactive.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
set_invisible(element_id_list: list[ElementId]) -> None
Sets the element invisible.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
set_material(element_id_list: list[ElementId], element_id: ElementId) -> None
Sets the element material.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
element_id
|
ElementId
|
The material ID to set. |
required |
set_mutable(element_id_list: list[ElementId]) -> None
Sets the element mutable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
set_opengl_color(element_id_list: list[ElementId], color: rgb_color) -> None
Sets the element OpenGL color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
color
|
rgb_color
|
The OpenGL color to set. |
required |
set_selectable(element_id_list: list[ElementId]) -> None
Sets a list of elements selectable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
set_texture_rotated(element_id_list: list[ElementId], flag: bool) -> None
Sets the rotation of the texture for a list of elements.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
A list of element id. |
required |
flag
|
bool
|
True to rotate the texture, false to not rotate it. |
required |
set_unselectable(element_id_list: list[ElementId]) -> None
Sets a list of elements unselectable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
set_use_material_texture(element_id_list: list[ElementId], value: bool) -> None
Sets element to use material texture.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The element id list. |
required |
value
|
bool
|
True to use material texture, false otherwise. |
required |
set_visible(element_id_list: list[ElementId]) -> None
Sets the element visible.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element_id_list
|
list[ElementId]
|
The list of element id. |
required |
show_all_elements() -> None
Shows all elements.
show_perspective_central() -> None
changes the viewmode to Perspective.
show_reference_side_beam(show: bool) -> None
Shows or hides the reference side beam.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
show
|
bool
|
True to show the reference side beam, false to hide it. |
required |
show_reference_side_panel(show: bool) -> None
Shows or hides the reference side panel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
show
|
bool
|
True to show the reference side panel, false to hide it. |
required |
show_reference_side_wall(show: bool) -> None
Shows or hides the reference side wall.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
show
|
bool
|
True to show the reference side wall, false to hide it. |
required |
show_view_axo() -> None
changes the viewmode to Axo.
show_view_dashed_hidden_lines() -> None
Sets the view to dashed hidden lines.
show_view_hidden_lines() -> None
Sets the view to hidden lines.
show_view_negative_x() -> None
Sets the view to -X.
show_view_negative_y() -> None
Sets the view to -Y.
show_view_negative_z() -> None
Sets the view to -Z.
show_view_positive_x() -> None
Sets the view to +X.
show_view_positive_y() -> None
Sets the view to +Y.
show_view_positive_z() -> None
Sets the view to +Z.
show_view_shaded1() -> None
Sets the view to shaded 1.
show_view_shaded2() -> None
Sets the view to shaded 2.
show_view_standard_axo() -> None
Sets the view to standard axonometry.
show_view_wireframe() -> None
Sets the view to wireframe.
zoom_active_elements() -> None
Zooms on all active elements.
zoom_all_elements() -> None
Zooms on all elements.