> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/viewers.md).

# Viewers

The **Viewers** object is a collection of all currently open standalone [image viewers](/directory-opus/manual/additional_functionality/viewing_images.md). It can be obtained via the [**DOpus**](/directory-opus/manual/reference/scripting_reference/scripting_objects/dopus.md)**.viewers** property.

&#x20;

| Property Name      | Return Type                                                                                                 | Description                                                                                                                                                          |
| ------------------ | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *\<default value>* | *collection:*[**Viewer**](/directory-opus/manual/reference/scripting_reference/scripting_objects/viewer.md) | Lets you enumerate the currently open viewers.                                                                                                                       |
| lastactive         | *object:*[**Viewer**](/directory-opus/manual/reference/scripting_reference/scripting_objects/viewer.md)     | Returns a [**Viewer**](/directory-opus/manual/reference/scripting_reference/scripting_objects/viewer.md) object representing the most recently active viewer window. |

| Method Name | **Arguments** | Return Type | Description                                                                                                                                                                                                                                                                        |
| ----------- | ------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Update      | *none*        | *none*      | The first time a script accesses the **DOpus.viewers** property, a snapshot is taken of all currently open viewers. If anything opens or closes viewers after this, these changes will not be reflected by snapshot unless you re-synchronize it by calling the **Update** method. |
