> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/scopeview/automation-api-and-scripting/use-python-scopeview-api/python-api-reference/acquisition.md).

# Acquisition

## Function: evalAllExpressions

| **Section**    | **Description**                                  |
| -------------- | ------------------------------------------------ |
| **Action**     | Evaluate all ScopeView expressions from template |
| **Parameters** | None                                             |
| **Returns**    | Error value (int)                                |
| **Raises**     | **AssertionError** – Raises exception on error   |

## Function: exportToFile

| **Section**    | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Action**     | Export ScopeView data source to desired format at provided file location                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Parameters** | <p><strong>file\_name</strong> (<em>str</em>) – path to export file<br><strong>parameters</strong> (<em>dict\[str, str], optional</em>) – optional dictionary of encoder-specific parameters.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Returns**    | Error value (int)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Raises**     | <p><strong>AssertionError</strong> – Raises exception on error<br>Supported options:<br>- COMTRADE (.cfg):<br>- <code>"version"</code>: COMTRADE standard version — <code>"1991"</code>, <code>"1997"</code>, <code>"1999"</code>, <code>"2001"</code>, <code>"2013"</code> (default: <code>"2013"</code>)<br>- <code>"dataType"</code>: data type for values — <code>"ascii"</code>, <code>"binary"</code>, <code>"binary32"</code>, <code>"float32"</code> (default: <code>"float32"</code>)<br>- <code>"lineFrequency"</code>: line frequency in Hz (default: <code>"60"</code>)<br>- PNG (.png):<br>- <code>"dpi"</code>: image resolution in dots per inch (default: <code>"72"</code>)<br>- JPEG (.jpg / .jpeg):<br>- <code>"dpi"</code>: image resolution in dots per inch<br>- <code>"width"</code>: image width in inches<br>- <code>"height"</code>: image height in inches</p> |

## Function: exportToPDF

| **Section**    | **Description**                                          |
| -------------- | -------------------------------------------------------- |
| **Action**     | Export ScopeView graphs to PDF at provided file location |
| **Parameters** | **file\_name** (*str*) – path to export PDF              |
| **Returns**    | Error value (int)                                        |
| **Raises**     | **AssertionError** – Raises exception on error           |

## Function: getCont

| **Section**    | **Description**          |
| -------------- | ------------------------ |
| **Action**     | Get ScopeView cont state |
| **Parameters** | None                     |
| **Returns**    | Cont state (str)         |
| **Raises**     | None                     |

## Function: getExpressions

| **Section**    | **Description**                              |
| -------------- | -------------------------------------------- |
| **Action**     | Gets all ScopeView expressions from template |
| **Parameters** | None                                         |
| **Returns**    | A list of ScopeView expressions (list\[str]) |
| **Raises**     | None                                         |

## Function: getNumAcq

| **Section**    | **Description**                      |
| -------------- | ------------------------------------ |
| **Action**     | Get number of ScopeView acquisitions |
| **Parameters** | None                                 |
| **Returns**    | Number of acquisitions (str)         |
| **Raises**     | None                                 |

## Function: getNumData

| **Section**    | **Description**              |
| -------------- | ---------------------------- |
| **Action**     | Get number of ScopeView data |
| **Parameters** | None                         |
| **Returns**    | Number of data (str)         |
| **Raises**     | None                         |

## Function: getSamplingRate

| **Section**    | **Description**                       |
| -------------- | ------------------------------------- |
| **Action**     | Get ScopeView acquisition sample rate |
| **Parameters** | None                                  |
| **Returns**    | Sample rate (str)                     |
| **Raises**     | None                                  |

## Function: getStartTime

| **Section**    | **Description**                      |
| -------------- | ------------------------------------ |
| **Action**     | Get ScopeView acquisition start time |
| **Parameters** | None                                 |
| **Returns**    | Start time (str)                     |
| **Raises**     | None                                 |

## Function: getTimeLength

| **Section**    | **Description**                    |
| -------------- | ---------------------------------- |
| **Action**     | Get ScopeView acquisition duration |
| **Parameters** | None                               |
| **Returns**    | Time length (str)                  |
| **Raises**     | None                               |

## Function: pauseAcquisition

| **Section**    | **Description**                                |
| -------------- | ---------------------------------------------- |
| **Action**     | Pause ScopeView acquisition                    |
| **Parameters** | None                                           |
| **Returns**    | Error value (int)                              |
| **Raises**     | **AssertionError** – Raises exception on error |

## Function: setCont

| **Section**    | **Description**                                |
| -------------- | ---------------------------------------------- |
| **Action**     | Set ScopeView cont option                      |
| **Parameters** | **value** (*bool*) – cont state                |
| **Returns**    | Error value (int)                              |
| **Raises**     | **AssertionError** – Raises exception on error |

## Function: setNumAcq

| **Section**    | **Description**                                |
| -------------- | ---------------------------------------------- |
| **Action**     | Set number of ScopeView acquisitions           |
| **Parameters** | **value** (*int*) – number of acquisition      |
| **Returns**    | Error value (int)                              |
| **Raises**     | **AssertionError** – Raises exception on error |

## Function: setSamplingRate

| **Section**    | **Description**                                         |
| -------------- | ------------------------------------------------------- |
| **Action**     | Set ScopeView acquisition sample rate                   |
| **Parameters** | **value** (*float*) – acquisition sample rate (seconds) |
| **Returns**    | Error value (int)                                       |
| **Raises**     | **AssertionError** – Raises exception on error          |

## Function: setStartTime

| **Section**    | **Description**                                           |
| -------------- | --------------------------------------------------------- |
| **Action**     | Set ScopeView acquisition start time                      |
| **Parameters** | **value** (*float*) – time to start acquisition (seconds) |
| **Returns**    | Error value (int)                                         |
| **Raises**     | **AssertionError** – Raises exception on error            |

## Function: setSync

| **Section**    | **Description**                                |
| -------------- | ---------------------------------------------- |
| **Action**     | Set ScopeView sync option                      |
| **Parameters** | **value** (*bool*) – sync state                |
| **Returns**    | Error value (int)                              |
| **Raises**     | **AssertionError** – Raises exception on error |

## Function: setTimeLength

| **Section**    | **Description**                                      |
| -------------- | ---------------------------------------------------- |
| **Action**     | Set ScopeView acquisition duration                   |
| **Parameters** | **value** (*float*) – acquisition duration (seconds) |
| **Returns**    | Error value (int)                                    |
| **Raises**     | **AssertionError** – Raises exception on error       |

## Function: setTrig

| **Section**    | **Description**                                |
| -------------- | ---------------------------------------------- |
| **Action**     | Set ScopeView trig option                      |
| **Parameters** | **value** (*bool*) – trig state                |
| **Returns**    | Error value (int)                              |
| **Raises**     | **AssertionError** – Raises exception on error |

## Function: startAcquisition

| **Section**    | **Description**                                |
| -------------- | ---------------------------------------------- |
| **Action**     | Start ScopeView acquisition                    |
| **Parameters** | None                                           |
| **Returns**    | Error value (int)                              |
| **Raises**     | **AssertionError** – Raises exception on error |

## Function: stopAcquisition

| **Section**    | **Description**                                |
| -------------- | ---------------------------------------------- |
| **Action**     | Stop ScopeView acquisition                     |
| **Parameters** | None                                           |
| **Returns**    | Error value (int)                              |
| **Raises**     | **AssertionError** – Raises exception on error |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/scopeview/automation-api-and-scripting/use-python-scopeview-api/python-api-reference/acquisition.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
