> 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/hypersim/automation-api-and-scripting/python-dashboard-api/api-reference/class-reference/widgetparameter.md).

# WidgetParameter

*class* opalone.\_internal.widget\_parameters.WidgetParameter(*parameter\_id*, *panel\_id*, *project\_id*, *data\_type*, *path*)

<table data-header-hidden><thead><tr><th width="158.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>A widget parameter is a parameter that is owned by a Widget.</td></tr><tr><td><strong>Parameters</strong></td><td><p><strong>parameter_id</strong> (<em>str</em>) – The ID of the parameter.</p><p><strong>panel_id</strong> (<em>str</em>) – The ID of the <code>Panel</code> that contains the widget that owns this parameter.</p><p><strong>project_id</strong> (<em>str</em>) – The ID of the <code>Project</code> that owns the parameter.</p><p><strong>data_type</strong> (<em>Data</em>) – A data value holder.</p></td></tr><tr><td><strong>Bases</strong></td><td>Parameter</td></tr></tbody></table>

## Method

### connect\_to

connect\_to(datapoint, is\_enabled=True, force\_enable=False)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Connect the current datapoint to another datapoint.</p><p>If the connection to create is enabled, i.e. <strong>is_enabled=True</strong>, and any datapoint in this new connection is actively connected to another datapoint, then some connection rules will apply and the new connection might be declared invalid.</p><p>If <strong>force_enable=True</strong>, conflicting connections will be disabled in favor of the new connection.</p><p>Some data types are incompatibles between one another, so that might result in an invalid connection. For example, a STRING data type cannot connect to a NUMERIC data type.</p><p>If the backend reports the connection to be invalid, this method will attempt to connect the other way around. For example, if A.connect_to(B) fails on the backend, this method will attempt the equivalent of B.connect_to(A). If this connection also fails, the first failure will be reported to the user.</p></td></tr><tr><td><strong>Parameters</strong></td><td><p><strong>datapoint</strong> (<em>str | Datapoint</em>) – The datapoint to connect to, either an ID or a datapoint object..</p><p><strong>is_enabled</strong> (<em>bool</em>) – A flag to enable (True) or disable (False) the connection to create.</p><p><strong>force_enable</strong> (<em>bool</em>) – A flag to drop (True) or not (False) any conflicting connections that already exist in the system.</p></td></tr><tr><td><strong>Returns</strong></td><td>A new connection instance</td></tr><tr><td><strong>Return type</strong></td><td>Connection</td></tr></tbody></table>

### delete

delete()

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Delete the current parameter.</p><p>This function does nothing for now, since a parameter deletion is not supported.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>To delete a parameter</strong>, the user must delete the Block or Widget owning this parameter.</p></div></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr></tbody></table>

### reset\_to\_default\_value

reset\_to\_default\_value()

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Reset a value to its default.</p><p>The default value is, generally, the value of the parameter as defined in the model containing this parameter. In particular, the default value is not a member of any ParameterSet.</p></td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr></tbody></table>

### to\_json

to\_json(*fields*, *values*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Convert this resource to a serialized JSON representation.</td></tr><tr><td><strong>Parameter</strong></td><td><ul><li><strong>fields</strong> (<em>tuple[str] | list[str]</em>) – Fields to include.</li><li><strong>values</strong> (<em>tuple[object] | list[object]</em>) – The value of each field</li></ul></td></tr><tr><td><strong>Returns</strong></td><td>The serialized JSON representation.</td></tr><tr><td><strong>Return type</strong></td><td>str</td></tr></tbody></table>

## Property

### alias

*property* alia&#x73;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Get the alias of the datapoint.</p><p>This property returns an AliasWrapper, which behaves like a string but also provides additional methods like generate(). If the alias is not set, it initializes with an empty AliasWrapper.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr><tr><td><strong>Returns</strong></td><td>The alias of the datapoint.</td></tr><tr><td><strong>Return type</strong></td><td>AliasWrapper | None</td></tr></tbody></table>

### connections

*property* connection&#x73;*: tuple\[Connection]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The connections going to this datapoint.</p><p>A connection allows describing a transfer of data between two datapoints.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### data\_type

*property* data\_typ&#x65;*: DataType*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The data type of the datapoint.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### default\_value

*property* default\_valu&#x65;*: bool | str | float | dict*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The default value of this datapoint.</p><p>The default value’s type is determined at runtime and depends on the Data type of the datapoint.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### id

*property* id: str

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The ID of the resource.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### is\_displayed\_on\_canvas

*property* is\_displayed\_on\_canva&#x73;*: bool*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Indicates if this datapoint is displayed on canvas (True) or not (False). If <em>True</em>, the datapoint and its value are displayed on the UI next to the block.</td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### is\_equal\_mode

*property* is\_equal\_mod&#x65;*: bool*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Indicates in this parameter has <em>equal mode</em> enabled (True) or not (False). The equal mode applies only on non-scalar values. When active, all indices of the non-scalar value are forced equal. A change for any index will also update all other indices to the same value.</td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### is\_favorite

*property* is\_favorit&#x65;*: bool*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Indicates if this datapoint is a <em>favorite</em> (True) or not (False). If <em>True</em>, the datapoint is displayed in the favorite section in the UI.</td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### is\_read\_only

*property* is\_read\_onl&#x79;*: bool*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Indicates if this parameter is <em>read-only</em> (True) or not (False). A read-only parameter is a parameter for which its value cannot be modified.</p><p>This property itself is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### is\_tunnable

*property* is\_tunabl&#x65;*: bool*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Indicates if this parameter is <em>tunable</em> (True) or not (False). A tunable parameter is a parameter for which its value can be modified while a simulation is running.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### is\_visible

*property* is\_visibl&#x65;*: bool*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Indicates if this datapoint is <em>visible</em> (True) or not (False).</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### name

*property* nam&#x65;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The name of the datapoint.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### path

*property* pat&#x68;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Path of a Datapoint in the model, seperated with “/”</td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### ref\_id

*property* ref\_i&#x64;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The reference ID of the datapoint.</p><p>This ID is only useful to lookup the datapoint’s library data.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### size

*property* siz&#x65;*: tuple\[int]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Array of values describing the size of multidimensional datapoints. Equals to (1) for scalars, (1, N) for row vectors, (M, 1) for column vectors, (M, N) for matrices and (D1, D2…, Dn) more generally.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### type

*property* typ&#x65;*: DatapointType*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The type of the datapoint.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### unit

*property* uni&#x74;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The units of the datapoint.</p><p>Example units: Volts, Amperes, seconds, etc.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### value

*property* valu&#x65;*: object*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The current value for this parameter.</p><p>The value’s type is determined at runtime and depends on the Data type of the datapoint.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>


---

# 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/hypersim/automation-api-and-scripting/python-dashboard-api/api-reference/class-reference/widgetparameter.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.
